Skip to content

Commit 35e07eb

Browse files
committed
oh, interesting
1 parent 6628f27 commit 35e07eb

1 file changed

Lines changed: 8 additions & 3 deletions

File tree

src/app.html

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@
7777
return val;
7878
};
7979
const browserHasStack = !!new Error().stack;
80-
const _parseFirefoxStack = stack => stack.split('\n').slice(1)
80+
const _parseFirefoxStack = stack => stack.split('\n')
8181
.map(line => {
8282
const at = line.indexOf('@');
8383
const secondCol = line.lastIndexOf(':');
@@ -108,11 +108,11 @@
108108
origin
109109
};
110110
});
111-
const _parseChromeStack = stack => stack.split('\n').slice(2)
111+
const _parseChromeStack = stack => stack.split('\n').slice(1)
112112
.map(line => {
113113
// we have no use for the human readable fluff
114114
line = line.slice(7);
115-
const firstOpenParen = line.indexOf('(');
115+
let firstOpenParen = line.indexOf('(');
116116
const secondOpenParen = line.indexOf('(', firstOpenParen +1);
117117
const firstCloseParen = line.indexOf(')');
118118
const secondCloseParen = line.indexOf(')', firstCloseParen +1);
@@ -126,12 +126,17 @@
126126
fourthCol = NaN;
127127
thirdCol = NaN;
128128
}
129+
if (firstOpenParen === -1) {
130+
firstOpenParen = firstCol +1;
131+
thirdCol = line.length;
132+
}
129133
const name = line.slice(0, firstOpenParen -1);
130134
const origin = [
131135
Number(line.slice(firstCol +1, secondCol)),
132136
Number(line.slice(secondCol +1, thirdCol || firstCloseParen))
133137
];
134138
let url = line.slice(firstOpenParen +1, firstCol);
139+
if (!url) url = name;
135140
let evalType = null;
136141
let evalOrigin = null;
137142
if (secondOpenParen !== -1) {

0 commit comments

Comments
 (0)