Skip to content

Commit

Permalink
bugfix
Browse files Browse the repository at this point in the history
  • Loading branch information
mitchdzugan committed Nov 20, 2020
1 parent 8f51670 commit 76bcc66
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion project.clj
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
(defproject mayu "0.1.53"
(defproject mayu "0.1.54"
:description "FIXME: write description"
:url "http://example.com/FIXME"
:license {:name "Eclipse Public License"
Expand Down
6 changes: 4 additions & 2 deletions src/cljc/mayu/dom.cljc
Original file line number Diff line number Diff line change
Expand Up @@ -256,15 +256,17 @@
[res])

(defnm take-cached-or-do [s k m]
{:keys [store exec get-cached]} <- (w/gets #(-> % :cache (get s)))
{:keys [store exec get-cached swap-store]} <- (w/gets #(-> % :cache (get s)))
let [data (or (get-cached k) (get store k))]
path <- curr-unique-path
{:keys [res events]} <-
(if (:off data)
(mdo
(w/modify #(assoc-in % [:cache s :store k :using path] true))
[data])
(exec s k path m))
(mdo
[(swap-store #(-> store))]
(exec s k path m)))
(w/eachm (keys events)
;; TODO These should probably be emit'd from the
;; TODO cache setup position itself instead of the
Expand Down

0 comments on commit 76bcc66

Please sign in to comment.