Skip to content

Commit 650fe98

Browse files
committed
- Vector, throw if out of bounds
1 parent 4879df1 commit 650fe98

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/main/cljs/cljs/core.cljs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12308,7 +12308,7 @@ reduces them without incurring seq initialization"
1230812308
(-nth [coll n]
1230912309
(if (and (<= 0 n) (< n (alength array)))
1231012310
(aget array n)
12311-
#_(throw (js/Error. (str "No item " n " in vector of length " (alength array))))))
12311+
(throw (js/Error. (str "No item " n " in vector of length " (alength array))))))
1231212312
(-nth [coll n not-found]
1231312313
(if (and (<= 0 n) (< n (alength array)))
1231412314
(aget array n)
@@ -12317,7 +12317,7 @@ reduces them without incurring seq initialization"
1231712317
ILookup
1231812318
(-lookup [coll k]
1231912319
(when (number? k)
12320-
(-nth coll k nil)))
12320+
(-nth coll k)))
1232112321
(-lookup [coll k not-found]
1232212322
(if (number? k)
1232312323
(-nth coll k not-found)

0 commit comments

Comments
 (0)