We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents a846327 + f9b868c commit 35f2d76Copy full SHA for 35f2d76
src/index.js
@@ -6,7 +6,10 @@ if (typeof exports !== undefined) {
6
if (typeof window !== undefined) {
7
window.netlifyIdentity = netlifyIdentity;
8
}
9
-
10
-document.addEventListener("DOMContentLoaded", () => {
+if (document.readyState === "loading") {
+ document.addEventListener("DOMContentLoaded", () => {
11
+ netlifyIdentity.init();
12
+ });
13
+} else {
14
netlifyIdentity.init();
-});
15
+}
0 commit comments