Skip to content

Commit a4681f9

Browse files
authored
Merge pull request #58 from SimonSiefke/feature/amd-loader-global-this
feature: set `amdLoaderGlobal` to `globalThis` in case `this` is not defined
2 parents bcebd7f + 6188d2f commit a4681f9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/core/env.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
*---------------------------------------------------------------------------------------------
1616
*--------------------------------------------------------------------------------------------*/
1717

18-
const _amdLoaderGlobal = this;
18+
const _amdLoaderGlobal = this ?? globalThis;
1919

2020
declare var module: {
2121
exports: any;

0 commit comments

Comments
 (0)