Skip to content
This repository has been archived by the owner on Nov 20, 2023. It is now read-only.

ref: Use var instead of const for module loader for ES5-compat #338

Merged
merged 1 commit into from
Jan 11, 2022
Merged
Changes from all commits
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
2 changes: 1 addition & 1 deletion src/sentry.loader.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ module.exports = function sentryLoader(content, map, meta) {
const { releasePromise, org, project } = this.query;
const callback = this.async();
releasePromise.then(version => {
let sentryRelease = `const _global = (typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {}); _global.SENTRY_RELEASE={id:"${version}"};`;
let sentryRelease = `var _global = (typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {}); _global.SENTRY_RELEASE={id:"${version}"};`;
if (project) {
const key = org ? `${project}@${org}` : project;
sentryRelease += `
Expand Down