fix unsafe extensions of protocols to native javascript objects
This commit is contained in:
parent
052d541f8e
commit
6440e4e605
2 changed files with 4 additions and 4 deletions
|
|
@ -169,7 +169,7 @@
|
||||||
(assoc structure kw (next-fn (get structure kw)))
|
(assoc structure kw (next-fn (get structure kw)))
|
||||||
))
|
))
|
||||||
|
|
||||||
(extend-type #?(:clj clojure.lang.AFn :cljs js/Function)
|
(extend-type #?(:clj clojure.lang.AFn :cljs function)
|
||||||
StructurePath
|
StructurePath
|
||||||
(select* [afn structure next-fn]
|
(select* [afn structure next-fn]
|
||||||
(i/filter-select afn structure next-fn))
|
(i/filter-select afn structure next-fn))
|
||||||
|
|
|
||||||
|
|
@ -214,7 +214,7 @@
|
||||||
(coerce-path (vec this)))
|
(coerce-path (vec this)))
|
||||||
])
|
])
|
||||||
|
|
||||||
#?(:clj Object :cljs js/Object)
|
#?(:clj Object :cljs object)
|
||||||
(coerce-path [this]
|
(coerce-path [this]
|
||||||
(cond (structure-path? this) (coerce-structure-path this)
|
(cond (structure-path? this) (coerce-structure-path this)
|
||||||
(obj-extends? `p/Collector this) (coerce-collector this)
|
(obj-extends? `p/Collector this) (coerce-collector this)
|
||||||
|
|
@ -273,7 +273,7 @@
|
||||||
nil
|
nil
|
||||||
(comp-paths* [sp]
|
(comp-paths* [sp]
|
||||||
(coerce-path sp))
|
(coerce-path sp))
|
||||||
#?(:clj Object :cljs js/Object)
|
#?(:clj Object :cljs object)
|
||||||
(comp-paths* [sp]
|
(comp-paths* [sp]
|
||||||
(coerce-path sp))
|
(coerce-path sp))
|
||||||
#?(:clj java.util.List :cljs cljs.core/PersistentVector)
|
#?(:clj java.util.List :cljs cljs.core/PersistentVector)
|
||||||
|
|
@ -353,7 +353,7 @@
|
||||||
(assoc v 0 val))
|
(assoc v 0 val))
|
||||||
(set-last [v val]
|
(set-last [v val]
|
||||||
(assoc v (-> v count dec) val))
|
(assoc v (-> v count dec) val))
|
||||||
#?(:clj Object :cljs js/Object)
|
#?(:clj Object :cljs object)
|
||||||
(set-first [l val]
|
(set-first [l val]
|
||||||
(set-first-list l val))
|
(set-first-list l val))
|
||||||
(set-last [l val]
|
(set-last [l val]
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue