Skip to content

Commit

Permalink
Merge pull request #58 from SimonSiefke/feature/amd-loader-global-this
Browse files Browse the repository at this point in the history
feature: set `amdLoaderGlobal` to `globalThis` in case `this` is not defined
  • Loading branch information
alexdima authored Aug 21, 2024
2 parents bcebd7f + 6188d2f commit a4681f9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/core/env.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
*---------------------------------------------------------------------------------------------
*--------------------------------------------------------------------------------------------*/

const _amdLoaderGlobal = this;
const _amdLoaderGlobal = this ?? globalThis;

declare var module: {
exports: any;
Expand Down

0 comments on commit a4681f9

Please sign in to comment.