Skip to content

Commit f5b9b14

Browse files
authored
use globalThis instead of global (#129)
1 parent 46c81ff commit f5b9b14

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ declare global {
1515
}
1616

1717
// do not warn in mocha hot-reloading environment
18-
if ((typeof global.it !== 'function' || typeof global.describe !== 'function') && global._politie_informant_loaded_) {
18+
if ((typeof globalThis.it !== 'function' || typeof globalThis.describe !== 'function') && globalThis._politie_informant_loaded_) {
1919
// tslint:disable-next-line:no-console
2020
console.error('@politie/informant already loaded, check for duplicate installs of library!');
2121
}
22-
global._politie_informant_loaded_ = true;
22+
globalThis._politie_informant_loaded_ = true;

0 commit comments

Comments
 (0)