Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fixed #595.

  • Loading branch information...
commit a1fa14b8786d5a827980bf83d81f7ebb6b13f249 1 parent e09164c
@jeluard jeluard authored swannodette committed
Showing with 5 additions and 2 deletions.
  1. +3 −2 src/cljs/cljs/core.cljs
  2. +2 −0  test/cljs/cljs/core_test.cljs
View
5 src/cljs/cljs/core.cljs
@@ -2021,8 +2021,9 @@ reduces them without incurring seq initialization"
(invoke [kw coll not-found]
(if (nil? coll)
not-found
- (when (satisfies? ILookup coll)
- (-lookup coll kw not-found))))
+ (if (satisfies? ILookup coll)
+ (-lookup coll kw not-found)
+ not-found)))
IHash
(-hash [_]
; This was checking if _hash == -1, should it stay that way?
View
2  test/cljs/cljs/core_test.cljs
@@ -193,6 +193,8 @@
(assert (= 2 ({:b 1} :a 2)))
(assert (= 2 ({} :a 2)))
(assert (= nil (:a {})))
+ (assert (= nil (:a "")))
+ (assert (= 2 (:a "" 2)))
(assert (= 2 (#{1 2 3} 2)))
(assert (zero? (hash (aget (js-obj) "foo"))))
Please sign in to comment.
Something went wrong with that request. Please try again.