From e41aaa9c57c2f73135d4b1d51b2b0c42b7c70dcc Mon Sep 17 00:00:00 2001 From: Milt Reder Date: Thu, 1 Mar 2018 19:18:24 -0500 Subject: [PATCH] In worker, check localStorage feature against js/self --- support/src/figwheel/client/utils.cljs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/support/src/figwheel/client/utils.cljs b/support/src/figwheel/client/utils.cljs index 831292da..9cad7c32 100644 --- a/support/src/figwheel/client/utils.cljs +++ b/support/src/figwheel/client/utils.cljs @@ -120,7 +120,9 @@ (defonce local-persistent-config (let [a (atom {})] - (when (feature? js/localStorage "setItem") + (when (case (host-env?) + :worker (feature? (.-localStorage js/self) "setItem") + (feature? js/localStorage "setItem")) (add-watch a :sync-local-storage (fn [_ _ _ n] (mapv (fn [[ky v]]