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

Commit

Permalink
ref: Use var instead of const for module loader for ES5-compat
Browse files Browse the repository at this point in the history
  • Loading branch information
kamilogorek committed Jan 11, 2022
1 parent 056227a commit c688a7f
Showing 1 changed file with 1 addition and 1 deletion.
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

2 comments on commit c688a7f

@junlinguo11
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

look forward to a new version :)

@kamilogorek
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Released :)

Please sign in to comment.