Skip to content

Commit 0c31551

Browse files
committed
fix
1 parent b849bad commit 0c31551

File tree

1 file changed

+10
-8
lines changed

1 file changed

+10
-8
lines changed

mixpanel-patched.js

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3767,14 +3767,16 @@ var add_dom_loaded_handler = function() {
37673767
});
37683768
}
37693769

3770-
if (document$1.readyState === 'complete') {
3771-
// safari 4 can fire the DOMContentLoaded event before loading all
3772-
// external JS (including this file). you will see some copypasta
3773-
// on the internet that checks for 'complete' and 'loaded', but
3774-
// 'loaded' is an IE thing
3775-
dom_loaded_handler();
3776-
} else {
3777-
document$1.addEventListener('DOMContentLoaded', dom_loaded_handler, false);
3770+
if (document$1.addEventListener) {
3771+
if (document$1.readyState === 'complete') {
3772+
// safari 4 can fire the DOMContentLoaded event before loading all
3773+
// external JS (including this file). you will see some copypasta
3774+
// on the internet that checks for 'complete' and 'loaded', but
3775+
// 'loaded' is an IE thing
3776+
dom_loaded_handler();
3777+
} else {
3778+
document$1.addEventListener('DOMContentLoaded', dom_loaded_handler, false);
3779+
}
37783780
}
37793781
};
37803782

0 commit comments

Comments
 (0)