File tree Expand file tree Collapse file tree 1 file changed +3
-5
lines changed
packages/firebase-crashlytics Expand file tree Collapse file tree 1 file changed +3
-5
lines changed Original file line number Diff line number Diff line change @@ -65,11 +65,9 @@ export class Crashlytics implements ICrashlytics {
6565 recordError ( error : any ) : void {
6666 if ( error instanceof Error ) {
6767 StackTrace . fromError ( error ) . then ( ( stack ) => {
68- const traceElements = [ ] ;
69- stack . forEach ( ( item , i ) => {
70- traceElements [ i ] = FIRStackFrame . stackFrameWithSymbolFileLine ( item . functionName || '(anonymous)' , item . fileName , item . lineNumber ) ;
71- } ) ;
72- const e = FIRExceptionModel . exceptionModelWithNameReason ( 'JavaScriptError' , error . message ) ;
68+ const traceElements = stack . map ( ( item ) => FIRStackFrame . stackFrameWithSymbolFileLine ( item . functionName || '(anonymous)' , item . fileName ?? '' , item . lineNumber ?? - 1 ) ) ;
69+ const e = FIRExceptionModel . exceptionModelWithNameReason ( error . name || 'JavaScriptError' , error . message ) ;
70+ e . stackTrace = NSArray . arrayWithArray ( traceElements ) ;
7371 this . native . recordExceptionModel ( e ) ;
7472 } ) ;
7573 } else {
You can’t perform that action at this time.
0 commit comments