Skip to content

Commit aea6f30

Browse files
Simon-LauxWofWca
andauthored
Update sim/webxdc.ts
Co-authored-by: WofWca <[email protected]>
1 parent 85fdb4c commit aea6f30

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

sim/webxdc.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -131,9 +131,9 @@ window.addEventListener("load", () => alterUi(getWebXdc().selfName, transport));
131131
// listen to messages coming into iframe
132132
window.addEventListener("message", (event) => {
133133
const isAllowed =
134-
event.origin.indexOf("localhost:") !== -1 ||
134+
event.origin.includes("localhost:") ||
135135
(location.host.endsWith(".webcontainer.io") &&
136-
event.origin.indexOf(".webcontainer.io") !== -1);
136+
event.origin.includes(".webcontainer.io"));
137137
if (!isAllowed) {
138138
return;
139139
}

0 commit comments

Comments
 (0)