Przeglądaj źródła

fix(compile): fix warnings

defclass 4 lat temu
rodzic
commit
7063a6649e
1 zmienionych plików z 4 dodań i 3 usunięć
  1. 4 3
      src/main/frontend/react_impls.cljs

+ 4 - 3
src/main/frontend/react_impls.cljs

@@ -1,13 +1,14 @@
 (ns frontend.react-impls
-  "Support different react implements.")
+  "Support different react implements."
+  (:require [rum.core]))
 
 ;; Remove rum *reactions* assert
 
 (defn rum-react
   "Works in conjunction with [[reactive]] mixin. Use this function instead of `deref` inside render, and your component will subscribe to changes happening to the derefed atom."
   [ref]
-  (when rum.core/*reactions*
-    (vswap! rum.core/*reactions* conj ref))
+  (when (deref #'rum.core/*reactions*)
+    (vswap! (deref #'rum.core/*reactions*) conj ref))
   (and ref @ref))
 
 (def react (atom rum-react))