Skip to content

Commit ffb35b4

Browse files
committed
fixes bundle docs to add window as any
1 parent cdf444a commit ffb35b4

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

v2/src/plugins/codeTypeChecking/index.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -612,7 +612,12 @@ function replaceCustomPlaceholdersInLine(child, exportedVariables) {
612612
* For snippets that contain supertokensUIInit, we add the dic id param parameter
613613
*/
614614
if (line.includes("supertokensUIInit(")) {
615-
line = line.split("supertokensUIInit(").join("supertokensUIInit(\"supertokensui\", ");
615+
line = line.split("supertokensUIInit(").join("(window as any).supertokensUIInit(\"supertokensui\", ");
616+
newLines.push(line);
617+
continue;
618+
}
619+
if (line.includes("supertokensUI") && !line.includes("supertokens-auth-react-script")) {
620+
line = line.split("supertokensUI").join("(window as any).supertokensUI");
616621
newLines.push(line);
617622
continue;
618623
}

0 commit comments

Comments
 (0)