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"]);