Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions src/okulary/core.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -100,11 +100,13 @@
;; As first step we apply the selector to
;; the new source value.
new-value (selector-fn new-source-value)
old-value (selector-fn old-source-value)]
old-value
(if (and (identical? srccache old-source-value)
(not (identical? cache EMPTY)))
cache
(selector-fn old-source-value))]

;; Store the new source value in the instance;
;; this is mainly used by the deref, so this is
;; just a small performance improvement for it.
;; Store the new source value in the instance cache
(set! srccache new-source-value)

;; Cache the new value in the instance.
Expand Down