Skip to content

Commit 47cd001

Browse files
authored
Fixes source maps in web worker (microsoft#157704)
1 parent dced70b commit 47cd001

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/vs/base/worker/workerMain.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,8 @@
1717
// see https://github.com/w3c/webappsec-trusted-types/wiki/Trusted-Types-for-function-constructor
1818
const fnArgs = args.slice(0, -1).join(',');
1919
const fnBody = args.pop()!.toString();
20-
const body = `(function anonymous(${fnArgs}) {\n${fnBody}\n})`;
20+
// Do not add a new line to fnBody, as this will confuse source maps.
21+
const body = `(function anonymous(${fnArgs}) { ${fnBody}\n})`;
2122
return body;
2223
}
2324
})

0 commit comments

Comments
 (0)