File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -29,12 +29,12 @@ interface CallSite {
29
29
* Parse a stack trace from
30
30
*/
31
31
export function getErrorStack ( error : Error ) : CallSite [ ] {
32
- const prepareStackTrace = Error . prepareStackTrace ! ;
32
+ const prepareStackTrace = Error . prepareStackTrace ;
33
33
let trace : CallSite [ ] ;
34
34
35
35
Error . prepareStackTrace = ( error , v8Trace ) => {
36
36
trace = v8Trace as CallSite [ ] ;
37
- return prepareStackTrace ( error , v8Trace ) ;
37
+ return prepareStackTrace ?. ( error , v8Trace ) ;
38
38
} ;
39
39
40
40
Error . captureStackTrace ( error , getErrorStack ) ;
@@ -82,7 +82,7 @@ export class Sentry {
82
82
83
83
constructor ( options : SentryOptions ) {
84
84
this . sentryUrl = new URL ( options . dsn ) ;
85
- this . fetch = options . fetch || fetch ;
85
+ this . fetch = options . fetch || fetch . bind ( null ) ;
86
86
}
87
87
88
88
/**
You can’t perform that action at this time.
0 commit comments