diff options
author | Stefan Giehl <stefan@piwik.org> | 2017-06-14 08:23:58 +0300 |
---|---|---|
committer | Matthieu Aubry <mattab@users.noreply.github.com> | 2017-06-14 08:23:58 +0300 |
commit | fe08be5148aca478c2b6cff64f9de9ae4ece5921 (patch) | |
tree | 88424b0f15466b808db6f9ab4a95612e4a596007 /plugins/CoreHome/javascripts | |
parent | b6fd19b92896b50bc6c89ecaaa4c4bbf4009c44d (diff) |
update only hash values when updating a segment (#11790)
Diffstat (limited to 'plugins/CoreHome/javascripts')
-rw-r--r-- | plugins/CoreHome/javascripts/broadcast.js | 7 |
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); |