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
path: root/js
diff options
context:
space:
mode:
authorYossiCohn <yossi.cohn@gmail.com>2020-09-01 01:38:17 +0300
committerGitHub <noreply@github.com>2020-09-01 01:38:17 +0300
commit7d4035b0ec613eb56cdda956ff1e52cb0ff10092 (patch)
tree42c2d21c2f9a95c22ad104def050afcf95eeeccd /js
parenta1e794996926fc9a5dea1aa8eca27d4ee792004a (diff)
Prevent possible infinite loop when page is unloading (#12114)
Diffstat (limited to 'js')
-rw-r--r--js/piwik.js8
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)
*/