Skip to content

Commit

Permalink
Fixes source maps in web worker (#157704)
Browse files Browse the repository at this point in the history
  • Loading branch information
hediet authored and joyceerhl committed Aug 10, 2022
1 parent 1043438 commit dcb69fb
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/vs/base/worker/workerMain.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@
// see https://github.com/w3c/webappsec-trusted-types/wiki/Trusted-Types-for-function-constructor
const fnArgs = args.slice(0, -1).join(',');
const fnBody = args.pop()!.toString();
const body = `(function anonymous(${fnArgs}) {\n${fnBody}\n})`;
// Do not add a new line to fnBody, as this will confuse source maps.
const body = `(function anonymous(${fnArgs}) { ${fnBody}\n})`;
return body;
}
})
Expand Down

0 comments on commit dcb69fb

Please sign in to comment.