Permalink
Browse files

CLJS-464: get-in throws ILookup error if not-found not provided

CLJS-458 added the correct satisfies? check, but the two arity case of
get-in was implemented via reduce instead of delegating to the
three arity case.
  • Loading branch information...
1 parent 3ed16f3 commit 2b21e9d5b09cdd09f2831d11810fa2c5ae4f14b1 @swannodette swannodette committed Jan 29, 2013
Showing with 5 additions and 1 deletion.
  1. +1 −1 src/cljs/cljs/core.cljs
  2. +4 −0 test/cljs/cljs/core_test.cljs
View
@@ -2731,7 +2731,7 @@ reduces them without incurring seq initialization"
{:added "1.2"
:static true}
([m ks]
- (reduce get m ks))
+ (get-in m ks nil))
([m ks not-found]
(loop [sentinel lookup-sentinel
m m
@@ -1820,5 +1820,9 @@
(assert (= (get-in {:a {:b 1}} [:a :b :c] :nothing-there)
:nothing-there))
+ ;; CLJS-464
+
+ (assert (nil? (get-in {:foo {:bar 2}} [:foo :bar :baz])))
+
:ok
)

0 comments on commit 2b21e9d

Please sign in to comment.