mirror of
https://github.com/janet-lang/janet
synced 2024-11-24 17:27:18 +00:00
commit
2e641a266d
@ -1381,7 +1381,7 @@
|
||||
a sequence of keys.`
|
||||
[ds ks &opt dflt]
|
||||
(var d ds)
|
||||
(loop [k :in ks :while d] (set d (get d k)))
|
||||
(loop [k :in ks :while (not (nil? d))] (set d (get d k)))
|
||||
(if (= nil d) dflt d))
|
||||
|
||||
(defn update-in
|
||||
|
@ -161,4 +161,10 @@
|
||||
([err] :caught))))
|
||||
"regression #638"))
|
||||
|
||||
# Issue #751
|
||||
(def t {:side false})
|
||||
(assert (nil? (get-in t [:side :note])) "get-in with false value")
|
||||
(assert (= (get-in t [:side :note] "dflt") "dflt")
|
||||
"get-in with false value and default")
|
||||
|
||||
(end-suite)
|
||||
|
Loading…
Reference in New Issue
Block a user