From eff6a854a078928b3534c57726000629cc644c56 Mon Sep 17 00:00:00 2001 From: Andrey Antukh Date: Fri, 15 Apr 2016 23:26:36 +0300 Subject: [PATCH] Initialize webworker only on browser environment. --- src/uxbox/data/core.cljs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/uxbox/data/core.cljs b/src/uxbox/data/core.cljs index 89ed9ca6af..f116d88efc 100644 --- a/src/uxbox/data/core.cljs +++ b/src/uxbox/data/core.cljs @@ -11,5 +11,9 @@ [uxbox.constants :as c] [uxbox.util.workers :as uw])) -(defonce worker (uw/init "/js/worker.js")) +;; This excludes webworker instantiation on nodejs where +;; the tests are run. + +(when (not= *target* "nodejs") + (defonce worker (uw/init "/js/worker.js")))