diff options
author | YossiCohn <yossi.cohn@gmail.com> | 2020-09-01 01:38:17 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-09-01 01:38:17 +0300 |
commit | 7d4035b0ec613eb56cdda956ff1e52cb0ff10092 (patch) | |
tree | 42c2d21c2f9a95c22ad104def050afcf95eeeccd /js | |
parent | a1e794996926fc9a5dea1aa8eca27d4ee792004a (diff) |
Prevent possible infinite loop when page is unloading (#12114)
Diffstat (limited to 'js')
-rw-r--r-- | js/piwik.js | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/js/piwik.js b/js/piwik.js index e7e4df7540..15e09d11fe 100644 --- a/js/piwik.js +++ b/js/piwik.js @@ -500,6 +500,14 @@ if (typeof window.Matomo !== 'object') { isPageUnloading = true; executePluginMethod('unload'); + + now = new Date(); + var aliasTime = now.getTimeAlias(); + if( (expireDateTime - aliasTime) > 3000) // fix bug #12108 + { + expireDateTime = aliasTime + 3000; + } + /* * Delay/pause (blocks UI) */ |