Skip to content

Commit 30263b4

Browse files
authored
Remove IE workaround in jsStackTrace (#21431)
1 parent aedf661 commit 30263b4

File tree

1 file changed

+1
-14
lines changed

1 file changed

+1
-14
lines changed

src/library_stack_trace.js

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -6,20 +6,7 @@
66

77
var LibraryStackTrace = {
88
$jsStackTrace: function() {
9-
var error = new Error();
10-
if (!error.stack) {
11-
// IE10+ special cases: It does have callstack info, but it is only
12-
// populated if an Error object is thrown, so try that as a special-case.
13-
try {
14-
throw new Error();
15-
} catch(e) {
16-
error = e;
17-
}
18-
if (!error.stack) {
19-
return '(no stack trace available)';
20-
}
21-
}
22-
return error.stack.toString();
9+
return new Error().stack.toString();
2310
},
2411

2512
$stackTrace__deps: ['$jsStackTrace'],

0 commit comments

Comments
 (0)