fix(oauth2): addEventListener only if document state is not 'loading' (#7828)
Co-authored-by: Tim Lai <timothy.lai@gmail.com>
This commit is contained in:
@@ -66,7 +66,11 @@
|
||||
window.close();
|
||||
}
|
||||
|
||||
window.addEventListener('DOMContentLoaded', function () {
|
||||
if( document.readyState !== 'loading' ) {
|
||||
run();
|
||||
});
|
||||
} else {
|
||||
document.addEventListener('DOMContentLoaded', function () {
|
||||
run();
|
||||
});
|
||||
}
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user