We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
global
1 parent 52f583d commit ac6da8fCopy full SHA for ac6da8f
packages/opentelemetry-api/src/api/global-utils.ts
@@ -38,7 +38,11 @@ type MyGlobals = Partial<{
38
[GLOBAL_TRACE_API_KEY]: Get<TracerProvider>;
39
}>;
40
41
-export const _global = global as typeof global & MyGlobals;
+export const _global = (typeof globalThis === 'object'
42
+ ? globalThis
43
+ : typeof global === 'object'
44
+ ? global
45
+ : window) as MyGlobals;
46
47
/**
48
* Make a function which accepts a version integer and returns the instance of an API if the version
0 commit comments