Skip to content

Commit

Permalink
Merge pull request #1162 from daslyfe/cors_pathname_issue
Browse files Browse the repository at this point in the history
[CORS HOTFIX]
  • Loading branch information
daslyfe authored Aug 12, 2024
2 parents d850726 + bfead58 commit 9d1674b
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion website/src/repl/util.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -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 () => {
Expand Down

0 comments on commit 9d1674b

Please sign in to comment.