(#1695) Respect priority when merging defaults
This commit adds an extra condition at the beginning of the `setup-map-defaults` function, such that if one of the two items being merged has a higher priority than the other, it is honored. This seems to fix the issue where the `^:replace` metadata was not working properly
This commit is contained in:
parent
1354f15877
commit
403e96a51e
1 changed files with 2 additions and 1 deletions
|
@ -319,7 +319,8 @@
|
|||
(fn [left right]
|
||||
;; Assumes that left always contains :reduce OR :prepend in its meta
|
||||
(with-meta
|
||||
(cond (-> left meta :reduce) (-> left meta :reduce
|
||||
(cond (different-priority? left right) (pick-prioritized left right)
|
||||
(-> left meta :reduce) (-> left meta :reduce
|
||||
(reduce left right))
|
||||
(-> left meta :prepend) (concat right left))
|
||||
(merge (meta left)
|
||||
|
|
Loading…
Reference in a new issue