Skip to content

Commit 0bf97dd

Browse files
committed
prefer JSON.stringify to literal doublequotes
1 parent f0c6abc commit 0bf97dd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

test/es-module/test-esm-import-meta-main-eval.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ function convertScriptSourceToDataUrl(script) {
2727
function wrapScriptInUrlWorker(script) {
2828
return `
2929
import { Worker } from 'node:worker_threads';
30-
new Worker(new URL("${convertScriptSourceToDataUrl(script)}"));
30+
new Worker(new URL(${JSON.stringify(convertScriptSourceToDataUrl(script))}));
3131
`;
3232
}
3333

0 commit comments

Comments
 (0)