mirror of
https://github.com/status-im/reagent.git
synced 2025-02-23 17:18:17 +00:00
Make should-component-update a little faster for :style attrs
This commit is contained in:
parent
b45a215f52
commit
344e9e5db5
@ -56,12 +56,12 @@
|
||||
(reduce-kv (fn [res k v]
|
||||
(let [yv (get y k -not-found)]
|
||||
(if (or (keyword-identical? v yv)
|
||||
;; hack to allow reagent.core/partial and :style
|
||||
;; maps to be compared with =
|
||||
(and (or
|
||||
(keyword-identical? k :style)
|
||||
(identical? (type v) partial-ifn))
|
||||
(= v yv)))
|
||||
;; Allow :style maps and reagent/partial
|
||||
;; and :style maps to be compared properly
|
||||
(and (keyword-identical? k :style)
|
||||
(shallow-equal-maps v yv))
|
||||
(and (identical? (type v) partial-ifn)
|
||||
(= y yv)))
|
||||
res
|
||||
(reduced false))))
|
||||
true x))))
|
||||
|
Loading…
x
Reference in New Issue
Block a user