fix(oauth2): addEventListener only if document state is not 'loading' (#7879)

This commit is contained in:
Tim Lai
2022-03-02 11:38:19 -08:00
committed by GitHub
parent 824917c2aa
commit 3eb05287ef

View File

@@ -67,9 +67,13 @@
window.close(); window.close();
} }
window.addEventListener('DOMContentLoaded', function () { if (document.readyState !== 'loading') {
run(); run();
}); } else {
document.addEventListener('DOMContentLoaded', function () {
run();
});
}
</script> </script>
</body> </body>
</html> </html>