1
0
mirror of https://github.com/janet-lang/janet synced 2025-11-07 11:03:04 +00:00

Merge pull request #752 from sogaiu/get-in-tweak

Tweak get-in behavior
This commit is contained in:
Calvin Rose
2021-08-06 15:14:33 -05:00
committed by GitHub
2 changed files with 7 additions and 1 deletions

View File

@@ -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