Skip to content

Commit

Permalink
use globalThis instead of global (#129)
Browse files Browse the repository at this point in the history
  • Loading branch information
emielb authored Jan 8, 2025
1 parent 46c81ff commit f5b9b14
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ declare global {
}

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

0 comments on commit f5b9b14

Please sign in to comment.