@@ -15,8 +15,8 @@ export const UNKNOWN_COMPONENT = 'unknown';
15
15
16
16
export type FallbackRender = ( errorData : {
17
17
error : Error ;
18
- componentStack : string | null ;
19
- eventId : string | null ;
18
+ componentStack : string | null | undefined ;
19
+ eventId : string | null | undefined ;
20
20
resetError ( ) : void ;
21
21
} ) => React . ReactElement ;
22
22
@@ -37,27 +37,27 @@ export type ErrorBoundaryProps = {
37
37
/** Called if resetError() is called from the fallback render props function */
38
38
onReset ?(
39
39
error : Error | null ,
40
- componentStack : string | null ,
41
- eventId : string | null ,
40
+ componentStack : string | null | undefined ,
41
+ eventId : string | null | undefined ,
42
42
) : void ;
43
43
/** Called on componentWillUnmount() */
44
44
onUnmount ?(
45
45
error : Error | null ,
46
- componentStack : string | null ,
47
- eventId : string | null ,
46
+ componentStack : string | null | undefined ,
47
+ eventId : string | null | undefined ,
48
48
) : void ;
49
49
/** Called before the error is captured by Sentry, allows for you to add tags or context using the scope */
50
50
beforeCapture ?(
51
51
scope : any ,
52
52
error : Error | null ,
53
- componentStack : string | null ,
53
+ componentStack : string | null | undefined ,
54
54
) : void ;
55
55
} ;
56
56
57
57
type ErrorBoundaryState = {
58
58
componentStack : React . ErrorInfo [ 'componentStack' ] | null ;
59
59
error : Error | null ;
60
- eventId : string | null ;
60
+ eventId : string | null | undefined ;
61
61
} ;
62
62
63
63
const INITIAL_STATE = {
0 commit comments