File tree 2 files changed +3
-3
lines changed
packages/react-dag-editor
src/lib/components/ErrorBoundary 2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change 4
4
"repository" : {
5
5
"url" : " https://github.com/microsoft/react-dag-editor.git"
6
6
},
7
- "version" : " 0.4.1 " ,
7
+ "version" : " 0.4.2 " ,
8
8
"dependencies" : {
9
9
"@fluentui/merge-styles" : " ^8.2.0" ,
10
10
"eventemitter3" : " ^4.0.7" ,
Original file line number Diff line number Diff line change @@ -54,7 +54,7 @@ export class ErrorBoundary extends React.Component<
54
54
}
55
55
56
56
const componentStackLines = this . state . errorInfo
57
- ? this . state . errorInfo . componentStack . split ( "\n" )
57
+ ? this . state . errorInfo . componentStack ? .split ( "\n" )
58
58
: [ ] ;
59
59
60
60
return (
@@ -63,7 +63,7 @@ export class ErrorBoundary extends React.Component<
63
63
< p > { `Error: ${ this . state . error } ` } </ p >
64
64
< p > { `ErrorInfo: ${ JSON . stringify ( this . state . errorInfo ) } ` } </ p >
65
65
< h2 > Component Stack</ h2 >
66
- { componentStackLines . map ( ( line , index ) => (
66
+ { ( componentStackLines ?? [ ] ) . map ( ( line , index ) => (
67
67
< p key = { index } > { line } </ p >
68
68
) ) }
69
69
</ div >
You can’t perform that action at this time.
0 commit comments