reorder params

This commit is contained in:
Toshit Chawda 2025-03-07 16:51:25 -08:00
parent 3da0e1d816
commit fbeaf15283
No known key found for this signature in database
GPG key ID: 91480ED99E2B3D9D
2 changed files with 4 additions and 5 deletions

View file

@ -25,7 +25,7 @@ Error.stackTraceLimit = 50;
const decoder = new TextDecoder(); const decoder = new TextDecoder();
function rewriteJsWasm( function rewriteJsWasm(
input: string | ArrayBuffer, input: string | Uint8Array,
source: string | null, source: string | null,
meta: URLMeta, meta: URLMeta,
module: boolean module: boolean
@ -41,16 +41,16 @@ function rewriteJsWasm(
out = rewrite_js( out = rewrite_js(
input, input,
meta.base.href, meta.base.href,
module,
source || "(unknown)", source || "(unknown)",
module,
$scramjet $scramjet
); );
} else { } else {
out = rewrite_js_from_arraybuffer( out = rewrite_js_from_arraybuffer(
new Uint8Array(input), input,
meta.base.href, meta.base.href,
module,
source || "(unknown)", source || "(unknown)",
module,
$scramjet $scramjet
); );
} }

View file

@ -366,7 +366,6 @@ async function rewriteBody(
workertype === "module" workertype === "module"
); );
if (flagEnabled("sourcemaps", meta.base) && map) { if (flagEnabled("sourcemaps", meta.base) && map) {
console.log(js);
js = js =
`${globalThis.$scramjet.config.globals.pushsourcemapfn}([${map.join(",")}], "${tag}");` + `${globalThis.$scramjet.config.globals.pushsourcemapfn}([${map.join(",")}], "${tag}");` +
(js instanceof Uint8Array ? new TextDecoder().decode(js) : js); (js instanceof Uint8Array ? new TextDecoder().decode(js) : js);