From ed8c039aa810672123e790c20b82aac511f5d256 Mon Sep 17 00:00:00 2001 From: Thomas Wilkerling Date: Mon, 3 Oct 2022 14:46:11 +0200 Subject: [PATCH] fix issue #251 --- src/worker/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/worker/index.js b/src/worker/index.js index 9923ffd..7f0723c 100644 --- a/src/worker/index.js +++ b/src/worker/index.js @@ -40,7 +40,7 @@ function WorkerIndex(options){ factory = factory.toString(); } - const is_node_js = self["exports"]; + const is_node_js = typeof window === "undefined" && self["exports"]; const _self = this; this.worker = create(factory, is_node_js, options["worker"]);