mirror of
https://github.com/janet-lang/janet
synced 2024-11-28 11:09:54 +00:00
commit
2e641a266d
@ -1381,7 +1381,7 @@
|
|||||||
a sequence of keys.`
|
a sequence of keys.`
|
||||||
[ds ks &opt dflt]
|
[ds ks &opt dflt]
|
||||||
(var d ds)
|
(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))
|
(if (= nil d) dflt d))
|
||||||
|
|
||||||
(defn update-in
|
(defn update-in
|
||||||
|
@ -161,4 +161,10 @@
|
|||||||
([err] :caught))))
|
([err] :caught))))
|
||||||
"regression #638"))
|
"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)
|
(end-suite)
|
||||||
|
Loading…
Reference in New Issue
Block a user