10BC0 chore: build dist · stacktracejs/error-stack-parser@409cdd7 · GitHub
[go: up one dir, main page]

Skip to content

Commit 409cdd7

Browse files
committed
chore: build dist
1 parent 1c9261a commit 409cdd7

File tree

3 files changed

+9
-9
lines changed
Open diff view settings

3 files changed

+9
-9
lines changed

dist/error-stack-parser.js

Lines changed: 7 additions & 7 deletions
< 7AAF td data-grid-cell-id="diff-951d68daf514726bd54a6c393a7b8efc7c027ae95785fadd6d143793837208e9-73-71-1" data-selected="false" role="gridcell" style="background-color:var(--diffBlob-additionNum-bgColor, var(--diffBlob-addition-bgColor-num));text-align:center" tabindex="-1" valign="top" class="focusable-grid-cell diff-line-number position-relative left-side">71
Original file line numberDiff line numberDiff line change
@@ -56,21 +56,21 @@
5656
return filtered.map(function(line) {
5757
if (line.indexOf('(eval ') > -1) {
5858
// Throw away eval information until we implement stacktrace.js/stackframe#8
59-
line = line.replace(/eval code/g, 'eval').replace(/(\(eval at [^()]*)|(\),.*$)/g, '');
59+
line = line.replace(/eval code/g, 'eval').replace(/(\(eval at [^()]*)|(,.*$)/g, '');
6060
}
61-
var sanitizedLine = line.replace(/^\s+/, '').replace(/\(eval code/g, '(');
61+
var sanitizedLine = line.replace(/^\s+/, '').replace(/\(eval code/g, '(').replace(/^.*?\s+/, '');
6262

6363
// capture and preseve the parenthesized location "(/foo/my bar.js:12:87)" in
6464
// case it has spaces in it, as the string is split on \s+ later on
65-
var location = sanitizedLine.match(/ (\((.+):(\d+):(\d+)\)$)/);
65+
var location = sanitizedLine.match(/ (\(.+\)$)/);
6666

6767
// remove the parenthesized location from the line, if it was matched
6868
sanitizedLine = location ? sanitizedLine.replace(location[0], '') : sanitizedLine;
6969

70-
var tokens = sanitizedLine.split(/\s+/).slice(1);
71-
// if a location was matched, pass it to extractLocation() otherwise pop the last token
72-
var locationParts = this.extractLocation(location ? location[1] : tokens.pop());
73-
var functionName = tokens.join(' ') || undefined;
70+
// if a location was matched, pass it to extractLocation() otherwise pass all sanitizedLine
+
// because this line doesn't have function name
72+
var locationParts = this.extractLocation(location ? location[1] : sanitizedLine);
73+
var functionName = location && sanitizedLine || undefined;
7474
var fileName = ['eval', '<anonymous>'].indexOf(locationParts[0]) > -1 ? undefined : locationParts[0];
7575

7676
return new StackFrame({

dist/error-stack-parser.min.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.

0 commit comments

Comments
 (0)
0