avoid globals

Signed-off-by: Fredrik Adelöw <freben@gmail.com>
This commit is contained in:
Fredrik Adelöw
2022-11-22 15:36:22 +01:00
parent 724ac79ed8
commit d3fea4ae0a
19 changed files with 212 additions and 21 deletions
@@ -19,7 +19,9 @@ function getGlobalObject() {
if (typeof window !== 'undefined' && window.Math === Math) {
return window;
}
// eslint-disable-next-line no-restricted-globals
if (typeof self !== 'undefined' && self.Math === Math) {
// eslint-disable-next-line no-restricted-globals
return self;
}
// eslint-disable-next-line no-new-func