File tree Expand file tree Collapse file tree 5 files changed +28
-84
lines changed
Expand file tree Collapse file tree 5 files changed +28
-84
lines changed Original file line number Diff line number Diff line change @@ -293,7 +293,7 @@ the test page with your VM. **Do not commit this change**
293293```
294294
295295Then you should be able debug using the dev setup: ` yarn run dev ` and the virtual machine. You can also
296- run the page used for function tests using ` yarn run test:functional:dev:debug `
296+ run the page used for function tests using ` yarn run test:functional:dev:debug-server `
297297
298298## Linting ✨
299299
Load Diff Large diffs are not rendered by default.
Original file line number Diff line number Diff line change @@ -31,13 +31,13 @@ export default class RoutingManager {
3131 currentConfiguration . index ,
3232 currentConfiguration
3333 ) . state ;
34- return Object . assign (
35- { } ,
36- this . getAllSearchParameters ( {
34+ // The content of getAllSearchParameters is destructured to return a plain object
35+ return {
36+ ... this . getAllSearchParameters ( {
3737 currentSearchParameters : this . originalConfig ,
3838 uiState : this . originalUIState ,
39- } )
40- ) ;
39+ } ) ,
40+ } ;
4141 }
4242
4343 render ( { state } ) {
@@ -63,11 +63,10 @@ export default class RoutingManager {
6363 uiState,
6464 } ) ;
6565
66- const fullHelperState = Object . assign (
67- { } ,
68- this . originalConfig ,
69- searchParameters
70- ) ;
66+ const fullHelperState = {
67+ ...this . originalConfig ,
68+ ...searchParameters ,
69+ } ;
7170
7271 if ( isEqual ( fullHelperState , searchParameters ) ) return ;
7372
@@ -162,11 +161,10 @@ export default class RoutingManager {
162161 uiState,
163162 } ) ;
164163
165- const fullSearchParameters = Object . assign (
166- { } ,
167- this . originalConfig ,
168- searchParameters
169- ) ;
164+ const fullSearchParameters = {
165+ ...this . originalConfig ,
166+ ...searchParameters ,
167+ } ;
170168
171169 fn ( fullSearchParameters ) ;
172170 } ) ;
Original file line number Diff line number Diff line change 11import algoliasearchHelper from 'algoliasearch-helper' ;
22import urlHelper from 'algoliasearch-helper/src/url' ;
33import isEqual from 'lodash/isEqual' ;
4- import assign from 'lodash/assign' ;
54
65const AlgoliaSearchHelper = algoliasearchHelper . AlgoliaSearchHelper ;
76
@@ -162,7 +161,10 @@ class URLSync {
162161 clearTimeout ( this . urlUpdateTimeout ) ;
163162 // compare with helper.state
164163 const partialHelperState = helper . getState ( this . trackedParameters ) ;
165- const fullHelperState = assign ( { } , this . originalConfig , partialHelperState ) ;
164+ const fullHelperState = {
165+ ...this . originalConfig ,
166+ ...partialHelperState ,
167+ } ;
166168
167169 if ( isEqual ( fullHelperState , fullState ) ) return ;
168170
@@ -215,7 +217,10 @@ class URLSync {
215217 qs ,
216218 { mapping : this . mapping }
217219 ) ;
218- const fullState = assign ( { } , this . originalConfig , partialState ) ;
220+ const fullState = {
221+ ...this . originalConfig ,
222+ ...partialState ,
223+ } ;
219224 fn ( fullState ) ;
220225 } ) ;
221226 }
Original file line number Diff line number Diff line change @@ -131,14 +131,11 @@ function analytics({
131131
132132 let formattedParams = [ ] ;
133133
134- const serializedRefinements = serializeRefinements (
135- Object . assign (
136- { } ,
137- state . state . disjunctiveFacetsRefinements ,
138- state . state . facetsRefinements ,
139- state . state . hierarchicalFacetsRefinements
140- )
141- ) ;
134+ const serializedRefinements = serializeRefinements ( {
135+ ...state . state . disjunctiveFacetsRefinements ,
136+ ...state . state . facetsRefinements ,
137+ ...state . state . hierarchicalFacetsRefinements ,
138+ } ) ;
142139
143140 const serializedNumericRefinements = serializeNumericRefinements (
144141 state . state . numericRefinements
You can’t perform that action at this time.
0 commit comments