We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7aebe1f commit 8baec64Copy full SHA for 8baec64
lazer/sdk/js/src/util/env-util.ts
@@ -10,9 +10,7 @@ const g = globalThis as Partial<{
10
* @returns true if in a worker of some kind, false if otherwise
11
*/
12
export function envIsServiceOrWebWorker() {
13
- const possiblyInAWorker =
14
- typeof WorkerGlobalScope !== "undefined" && g.self !== undefined;
15
- return possiblyInAWorker && g.self instanceof WorkerGlobalScope;
+ return typeof WorkerGlobalScope !== "undefined" && g.self instanceof WorkerGlobalScope;
16
}
17
18
/**
0 commit comments