Merge pull request #1162 from daslyfe/cors_pathname_issue

[CORS HOTFIX]
This commit is contained in:
Jade (Rose) Rowland 2024-08-12 12:57:21 -04:00 committed by GitHub
commit 9d1674b13c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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 () => {