Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/matomo-org/matomo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Giehl <stefan@piwik.org>2017-06-14 08:23:58 +0300
committerMatthieu Aubry <mattab@users.noreply.github.com>2017-06-14 08:23:58 +0300
commitfe08be5148aca478c2b6cff64f9de9ae4ece5921 (patch)
tree88424b0f15466b808db6f9ab4a95612e4a596007 /plugins/CoreHome/javascripts
parentb6fd19b92896b50bc6c89ecaaa4c4bbf4009c44d (diff)
update only hash values when updating a segment (#11790)
Diffstat (limited to 'plugins/CoreHome/javascripts')
-rw-r--r--plugins/CoreHome/javascripts/broadcast.js7
1 files changed, 6 insertions, 1 deletions
diff --git a/plugins/CoreHome/javascripts/broadcast.js b/plugins/CoreHome/javascripts/broadcast.js
index a58868261f..4b9a8f21ed 100644
--- a/plugins/CoreHome/javascripts/broadcast.js
+++ b/plugins/CoreHome/javascripts/broadcast.js
@@ -315,10 +315,15 @@ var broadcast = {
if (!currentSearchStr) {
currentSearchStr = '?';
}
-
+
var oldUrl = currentSearchStr + currentHashStr;
for (var i = 0; i < params_vals.length; i++) {
+
+ if(params_vals[i].length == 0) {
+ continue; // updating with empty string would destroy some values
+ }
+
// update both the current search query and hash string
currentSearchStr = broadcast.updateParamValue(params_vals[i], currentSearchStr);