Skip to content

Commit adca1e7

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

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/components/errors/ErrorDebug.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ type Props = {
1515
* @param props
1616
*/
1717
const ErrorDebug = (props: Props): JSX.Element => {
18-
const { error, context }: Props = props;
19-
const { message, stack } = error;
18+
const { error, context }: Props = props || {};
19+
const { message, stack } = error || {};
2020

2121
let stringifiedContext;
2222
try {

0 commit comments

Comments
 (0)