Skip to content

Commit 611eb19

Browse files
committed
Merge pull request #44 from garymathews/invalidArrayLength
Fix 'Invalid array length' error
2 parents 8e14977 + 5110ca0 commit 611eb19

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

dist/longjohn.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/longjohn.coffee

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ limit_frames = (stack) ->
9595
if previous?.__previous__?.__cached_trace__
9696
len = previous.__previous__.__cached_trace__.length
9797
previous = stack
98-
while previous? and previous != which_previous_must_delete.__previous__ and previous.__cached_trace__.length
98+
while previous? and previous != which_previous_must_delete.__previous__ and previous.__cached_trace__.length >= (len+1)
9999
previous.__cached_trace__.length -= (len+1)
100100
previous = previous.__previous__
101101
delete previous.__previous__

0 commit comments

Comments
 (0)