Skip to content

Commit a84b7b7

Browse files
committed
Revert "Merge pull request #166 from benjamingr/patch-1"
This reverts commit 11df110, reversing changes made to b4077c1.
1 parent 11df110 commit a84b7b7

File tree

1 file changed

+15
-9
lines changed

1 file changed

+15
-9
lines changed

stacktrace.js

+15-9
Original file line numberDiff line numberDiff line change
@@ -80,15 +80,21 @@
8080
fromError: function StackTrace$$fromError(error, opts) {
8181
opts = _merge(_options, opts);
8282
var gps = new StackTraceGPS(opts);
83-
var stackframes = ErrorStackParser.parse(error);
84-
if (typeof opts.filter === 'function') {
85-
stackframes = stackframes.filter(opts.filter);
86-
}
87-
return Promise.all(stackframes.map(function(sf) {
88-
return gps.pinpoint(sf);
89-
}).catch(function(error) {
90-
return sf;
91-
}));
83+
return new Promise(function(resolve) {
84+
var stackframes = ErrorStackParser.parse(error);
85+
if (typeof opts.filter === 'function') {
86+
stackframes = stackframes.filter(opts.filter);
87+
}
88+
resolve(Promise.all(stackframes.map(function(sf) {
89+
return new Promise(function(resolve) {
90+
function resolveOriginal() {
91+
resolve(sf);
92+
}
93+
94+
gps.pinpoint(sf).then(resolve, resolveOriginal)['catch'](resolveOriginal);
95+
});
96+
})));
97+
}.bind(this));
9298
},
9399

94100
/**

0 commit comments

Comments
 (0)