This repository was archived by the owner on Feb 23, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 4 files changed +7
-7
lines changed Expand file tree Collapse file tree 4 files changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -198,7 +198,7 @@ export const removeArgsFromFilterUrl = (
198
198
if ( filteringForPhpTemplate ) {
199
199
window . location . href = newUrl ;
200
200
} else {
201
- window . history . pushState ( { } , '' , newUrl ) ;
201
+ window . history . replaceState ( { } , '' , newUrl ) ;
202
202
}
203
203
} ;
204
204
@@ -236,6 +236,6 @@ export const cleanFilterUrl = () => {
236
236
if ( filteringForPhpTemplate ) {
237
237
window . location . href = newUrl ;
238
238
} else {
239
- window . history . pushState ( { } , '' , newUrl ) ;
239
+ window . history . replaceState ( { } , '' , newUrl ) ;
240
240
}
241
241
} ;
Original file line number Diff line number Diff line change @@ -284,7 +284,7 @@ const AttributeFilterBlock = ( {
284
284
if ( filteringForPhpTemplate ) {
285
285
window . location . href = newUrl ;
286
286
} else {
287
- window . history . pushState ( { } , '' , newUrl ) ;
287
+ window . history . replaceState ( { } , '' , newUrl ) ;
288
288
}
289
289
} else {
290
290
const newUrl = formatParams ( pageUrl , query ) ;
@@ -295,7 +295,7 @@ const AttributeFilterBlock = ( {
295
295
if ( filteringForPhpTemplate ) {
296
296
window . location . href = newUrl ;
297
297
} else {
298
- window . history . pushState ( { } , '' , newUrl ) ;
298
+ window . history . replaceState ( { } , '' , newUrl ) ;
299
299
}
300
300
}
301
301
}
Original file line number Diff line number Diff line change @@ -190,7 +190,7 @@ const PriceFilterBlock = ( {
190
190
}
191
191
192
192
// When filtering All Products block, we only update the URL.
193
- window . history . pushState ( { } , '' , newUrl ) ;
193
+ window . history . replaceState ( { } , '' , newUrl ) ;
194
194
}
195
195
}
196
196
Original file line number Diff line number Diff line change @@ -200,7 +200,7 @@ const StockStatusFilterBlock = ( {
200
200
if ( isPhpTemplate ) {
201
201
window . location . href = url ;
202
202
} else {
203
- window . history . pushState ( { } , '' , url ) ;
203
+ window . history . replaceState ( { } , '' , url ) ;
204
204
}
205
205
}
206
206
@@ -218,7 +218,7 @@ const StockStatusFilterBlock = ( {
218
218
if ( isPhpTemplate ) {
219
219
window . location . href = newUrl ;
220
220
} else {
221
- window . history . pushState ( { } , '' , newUrl ) ;
221
+ window . history . replaceState ( { } , '' , newUrl ) ;
222
222
}
223
223
} ;
224
224
You can’t perform that action at this time.
0 commit comments