Fork me on GitHub
#figwheel-main
<
2019-07-05
>
oskarkv20:07:42

I have this the following code, which is correct, but figwheel gives me a warning. What's up with that?

(defn give-rewards [state]
  (let [path [:player :inventory]
        mlvl (get-in state [:mob :level])
        item (sni/generate-item mlvl)
        slot (first-emtpy-slot (get-in state path))]
    (cond-> state
      (and slot item) (assoc-in (conj path slot) item))))
135          item (sni/generate-item mlvl)
136          slot (first-emtpy-slot (get-in state path))]
137      (cond-> state
138        (and slot item) (assoc-in (conj path slot) item))))
            ^--- Can't take value of macro cljs.core/and

dpsutton20:07:04

check out #clojurescript . just discussed this issue