Disable threading for now, add locationProxy.host as an *empty string*, it will get overriden later, but TS doesn't know that.

This commit is contained in:
wearrrrr 2024-07-16 16:33:20 -05:00
parent d433f67d67
commit f42274d5ce
2 changed files with 6 additions and 2 deletions

View file

@ -11,7 +11,9 @@ function createLocation() {
return loc; return loc;
} }
export const locationProxy = new Proxy({}, { export const locationProxy = new Proxy({
host: ""
}, {
get(target, prop) { get(target, prop) {
const loc = createLocation(); const loc = createLocation();

View file

@ -115,7 +115,9 @@ export async function swfetch(this: ScramjetServiceWorker, { request }: FetchEve
} }
break; break;
case "script": case "script":
responseBody = await this.threadpool.rewriteJs(await response.arrayBuffer(), url.toString()); responseBody = rewriteJs(await response.arrayBuffer(), url);
// Disable threading for now, it's causing issues.
// responseBody = await this.threadpool.rewriteJs(responseBody, url.toString());
break; break;
case "style": case "style":
responseBody = rewriteCss(await response.text(), url); responseBody = rewriteCss(await response.text(), url);