Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion packages/bundler-plugin-core/src/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -314,7 +314,7 @@ export function generateGlobalInjectorCode({
}) {
// The code below is mostly ternary operators because it saves bundle size.
// The checks are to support as many environments as possible. (Node.js, Browser, webworkers, etc.)
let code = `
let code = `(function () {
var _global =
typeof window !== 'undefined' ?
window :
Expand All @@ -335,6 +335,8 @@ export function generateGlobalInjectorCode({
_global.SENTRY_BUILD_INFO=${JSON.stringify(buildInfo)};`;
}

code += '})();';

return code;
}

Expand Down
Loading