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:
authorThomas Steur <tsteur@users.noreply.github.com>2017-04-27 00:23:06 +0300
committerStefan Giehl <stefan@piwik.org>2017-04-27 00:23:06 +0300
commit0064cb9a923cdd660a78f100d28f6715b0522efa (patch)
tree45c9ca558e9668d121dca20364f5e0e8424f0e3b /plugins/CoreHome/javascripts/broadcast.js
parenta36aeb599704199392b8aa8a72a22298ab377429 (diff)
Fix propagateNewPage does not work when no URL parameters are set (#11652)
to reproduce eg go to https://www.example.com and then execute this method. It would generate a URL like https://www.example.com/module=Foo&action=bar
Diffstat (limited to 'plugins/CoreHome/javascripts/broadcast.js')
-rw-r--r--plugins/CoreHome/javascripts/broadcast.js5
1 files changed, 5 insertions, 0 deletions
diff --git a/plugins/CoreHome/javascripts/broadcast.js b/plugins/CoreHome/javascripts/broadcast.js
index 7117a0fb69..d279598039 100644
--- a/plugins/CoreHome/javascripts/broadcast.js
+++ b/plugins/CoreHome/javascripts/broadcast.js
@@ -304,6 +304,11 @@ var broadcast = {
// available in global scope
var currentSearchStr = window.location.search;
var currentHashStr = broadcast.getHashFromUrl();
+
+ if (!currentSearchStr) {
+ currentSearchStr = '?';
+ }
+
var oldUrl = currentSearchStr + currentHashStr;
for (var i = 0; i < params_vals.length; i++) {