Skip to content

Commit a7605dc

Browse files
Merge pull request #14 from Mayank1791989/fix/v8orIE_multiline_message
fix parsing of error when error message is multiline in chrome or IE
2 parents 07afa16 + 305d796 commit a7605dc

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)