diff --git a/website/src/repl/util.mjs b/website/src/repl/util.mjs index c43c29e6..8d8cfba4 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 () => {