fix dummy serviceworker methods

This commit is contained in:
velzie 2024-07-30 08:18:29 -04:00
parent 1a98345d9e
commit dad6cf1371
No known key found for this signature in database
GPG key ID: 048413F95F0DDE1F
3 changed files with 23 additions and 4 deletions

View file

@ -9,10 +9,6 @@ export default function (client: ScramjetClient, self: typeof globalThis) {
if (typeof ctx.args[0] === "string" || ctx.args[0] instanceof URL) {
ctx.args[0].toString();
ctx.args[0] = encodeUrl(ctx.args[0].toString());
} else if (ctx.args[0] instanceof Request && ctx.args[0].url) {
Object.defineProperty(ctx.args[0], "url", {
value: encodeUrl(ctx.args[0].url),
});
}
},
});