mirror of
https://github.com/penpot/penpot.git
synced 2026-04-25 11:18:36 +00:00
🐛 Fix reversed d/in-range? args in CLJS Fills -nth with default
In the ClojureScript Fills deftype, the two-arity -nth implementation called (d/in-range? i size) but the signature is (d/in-range? size i). This meant -nth always fell through to the default value for any valid index when called with an explicit default, since i < size is the condition but the args were swapped. The no-default -nth sibling on line 378 and both CLJ nth impls on lines 286 and 291 had the correct argument order. Signed-off-by: Andrey Antukh <niwi@niwi.nz>
This commit is contained in:
parent
6da39bc9c7
commit
30931839b5
@ -380,7 +380,7 @@
|
||||
nil))
|
||||
|
||||
(-nth [_ i default]
|
||||
(if (d/in-range? i size)
|
||||
(if (d/in-range? size i)
|
||||
(read-fill dbuffer mbuffer i)
|
||||
default))
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user