Skip to content

Commit

Permalink
In worker, check localStorage feature against js/self
Browse files Browse the repository at this point in the history
  • Loading branch information
milt committed Mar 2, 2018
1 parent df92a3c commit e41aaa9
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion support/src/figwheel/client/utils.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -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]]
Expand Down

0 comments on commit e41aaa9

Please sign in to comment.