diff --git a/src/webR/utils.ts b/src/webR/utils.ts index 7b7d427b..8d7e819b 100644 --- a/src/webR/utils.ts +++ b/src/webR/utils.ts @@ -111,7 +111,7 @@ export function newCrossOriginWorker(url: string, cb: (worker: Worker) => void, export function isCrossOrigin(urlString: string) { if (IN_NODE) return false; const url1 = new URL(location.href); - const url2 = new URL(urlString, location.origin); + const url2 = new URL(urlString); if (url1.host === url2.host && url1.port === url2.port && url1.protocol === url2.protocol) { return false; }