Browse Source

chore(lazer-sdk-js): more PR feedback changes about brevity

benduran 1 month ago
parent
commit
8baec64433
1 changed files with 1 additions and 3 deletions
  1. 1 3
      lazer/sdk/js/src/util/env-util.ts

+ 1 - 3
lazer/sdk/js/src/util/env-util.ts

@@ -10,9 +10,7 @@ const g = globalThis as Partial<{
  * @returns true if in a worker of some kind, false if otherwise
  * @returns true if in a worker of some kind, false if otherwise
  */
  */
 export function envIsServiceOrWebWorker() {
 export function envIsServiceOrWebWorker() {
-  const possiblyInAWorker =
-    typeof WorkerGlobalScope !== "undefined" && g.self !== undefined;
-  return possiblyInAWorker && g.self instanceof WorkerGlobalScope;
+  return typeof WorkerGlobalScope !== "undefined" && g.self instanceof WorkerGlobalScope;
 }
 }
 
 
 /**
 /**