8000 fix parsing of error when error message is multiline in chrome or IE · stacktracejs/error-stack-parser@305d796 · GitHub
[go: up one dir, main page]

Skip to content

Commit 305d796

Browse files
author
Mayank Agarwal
committed
fix parsing of error when error message is multiline in chrome or IE
1 parent 07afa16 commit 305d796

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

error-stack-parser.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,9 @@
5555
},
5656

5757
parseV8OrIE: function ErrorStackParser$$parseV8OrIE(error) {
58-
return error.stack.split('\n').slice(1).map(function (line) {
58+
return error.stack.split('\n').filter(function (line) {
59+
return !!line.match(CHROME_IE_STACK_REGEXP);
60+
}, this).map(function (line) {
5961
var tokens = line.replace(/^\s+/, '').split(/\s+/).slice(1);
6062
var locationParts = this.extractLocation(tokens.pop());
6163
var functionName = (!tokens[0] || tokens[0] === 'Anonymous') ? undefined : tokens[0];

0 commit comments

Comments
 (0)
0