Skip to content

Commit c571f31

Browse files
committed
Fix "TypeError: Cannot destructure property 'message' of 'error' as it is undefined."
1 parent ae1bf31 commit c571f31

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/components/errors/ErrorDebug.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ type Props = {
1616
*/
1717
const ErrorDebug = (props: Props): JSX.Element => {
1818
const { error, context }: Props = props;
19-
const { message, stack } = error;
19+
const { message, stack } = error || {};
2020

2121
let stringifiedContext;
2222
try {

0 commit comments

Comments
 (0)