diff options
author | Thomas Steur <tsteur@users.noreply.github.com> | 2017-04-27 00:23:06 +0300 |
---|---|---|
committer | Stefan Giehl <stefan@piwik.org> | 2017-04-27 00:23:06 +0300 |
commit | 0064cb9a923cdd660a78f100d28f6715b0522efa (patch) | |
tree | 45c9ca558e9668d121dca20364f5e0e8424f0e3b /plugins/CoreHome/javascripts/broadcast.js | |
parent | a36aeb599704199392b8aa8a72a22298ab377429 (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.js | 5 |
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++) { |