]> _ Git - pmi.git/commitdiff
Fix #3119 @0:05
authorStephen Cameron <stephen@cubedesigners.com>
Tue, 8 Oct 2019 14:06:35 +0000 (16:06 +0200)
committerStephen Cameron <stephen@cubedesigners.com>
Tue, 8 Oct 2019 14:06:35 +0000 (16:06 +0200)
resources/js/components/ProductsFilters.vue

index e712303fbe58ab67caaf1b776d6a362a3a602748..c740cd5536e7fd67600e52efb3efbd73dfb4a989 100644 (file)
                 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);
                 }
             }
         },