Skip to content

Commit 824917c

Browse files
Bogdan-Hasanovtim-lai
andauthoredMar 2, 2022
fix(oauth2): addEventListener only if document state is not 'loading' (#7828)
Co-authored-by: Tim Lai <timothy.lai@gmail.com>
1 parent 544d16d commit 824917c

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed
 

‎dev-helpers/oauth2-redirect.html

+6-2
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,11 @@
6666
window.close();
6767
}
6868

69-
window.addEventListener('DOMContentLoaded', function () {
69+
if( document.readyState !== 'loading' ) {
7070
run();
71-
});
71+
} else {
72+
document.addEventListener('DOMContentLoaded', function () {
73+
run();
74+
});
75+
}
7276
</script>

0 commit comments

Comments
 (0)
Please sign in to comment.