From e277c56371b24fb5737697360720bfa617f62972 Mon Sep 17 00:00:00 2001 From: Stephen Cameron Date: Tue, 8 Oct 2019 16:06:35 +0200 Subject: [PATCH] Fix #3119 @0:05 --- resources/js/components/ProductsFilters.vue | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) 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); } } }, -- 2.39.5