From: Stephen Cameron Date: Tue, 8 Oct 2019 14:06:35 +0000 (+0200) Subject: Fix #3119 @0:05 X-Git-Url: http://git.cubedesigners.com/?a=commitdiff_plain;h=e277c56371b24fb5737697360720bfa617f62972;p=pmi.git Fix #3119 @0:05 --- diff --git a/resources/js/components/ProductsFilters.vue b/resources/js/components/ProductsFilters.vue index e712303..c740cd5 100644 --- a/resources/js/components/ProductsFilters.vue +++ b/resources/js/components/ProductsFilters.vue @@ -172,14 +172,10 @@ deep: true, handler(oldFilters, newFilters) { - if (this.filterQuerystring !== '') { - - // Using square brackets in the URL can cause problems due to URL encoding and decoding - // so it's better to remove them while also shortening the URL to simply use Fx=... - const safeQuerystring = this.filterQuerystring.replace(/filter\[(\d+)]/g, 'F$1'); - - history.replaceState(newFilters, '', '?' + safeQuerystring); - } + // Using square brackets in the URL can cause problems due to URL encoding and decoding + // so it's better to remove them while also shortening the URL to simply use Fx=... + const safeQuerystring = this.filterQuerystring.replace(/filter\[(\d+)]/g, 'F$1'); + history.replaceState(newFilters, '', '?' + safeQuerystring); } } },