Skip to content

Commit

Permalink
fixes bundle docs to add window as any
Browse files Browse the repository at this point in the history
  • Loading branch information
rishabhpoddar committed Aug 8, 2024
1 parent cdf444a commit ffb35b4
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion v2/src/plugins/codeTypeChecking/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -612,7 +612,12 @@ function replaceCustomPlaceholdersInLine(child, exportedVariables) {
* For snippets that contain supertokensUIInit, we add the dic id param parameter
*/
if (line.includes("supertokensUIInit(")) {
line = line.split("supertokensUIInit(").join("supertokensUIInit(\"supertokensui\", ");
line = line.split("supertokensUIInit(").join("(window as any).supertokensUIInit(\"supertokensui\", ");
newLines.push(line);
continue;
}
if (line.includes("supertokensUI") && !line.includes("supertokens-auth-react-script")) {
line = line.split("supertokensUI").join("(window as any).supertokensUI");
newLines.push(line);
continue;
}
Expand Down

0 comments on commit ffb35b4

Please sign in to comment.