File tree Expand file tree Collapse file tree 1 file changed +9
-15
lines changed Expand file tree Collapse file tree 1 file changed +9
-15
lines changed Original file line number Diff line number Diff line change 8080 fromError : function StackTrace$$fromError ( error , opts ) {
8181 opts = _merge ( _options , opts ) ;
8282 var gps = new StackTraceGPS ( opts ) ;
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 ) ) ;
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+ } ) ) ;
9892 } ,
9993
10094 /**
You can’t perform that action at this time.
0 commit comments