From 926c893c4fca04b9dd5c40128240e1746e20ab31 Mon Sep 17 00:00:00 2001 From: "Jade (Rose) Rowland" Date: Mon, 12 Aug 2024 12:54:05 -0400 Subject: [PATCH] check iframe --- website/src/repl/util.mjs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/website/src/repl/util.mjs b/website/src/repl/util.mjs index c43c29e6..04f137c1 100644 --- a/website/src/repl/util.mjs +++ b/website/src/repl/util.mjs @@ -135,7 +135,11 @@ export async function shareCode(codeToShare) { export const ReplContext = createContext(null); export const isUdels = () => { - return window.parent?.location.pathname.includes('udels'); + const isIframe = window.location !== window.parent.location; + if (isIframe) { + return false + } + return window.parent?.location?.pathname.includes('udels'); }; export const getAudioDevices = async () => {