From c571f315bf7540d3e4de2ce9b061cf576279dd70 Mon Sep 17 00:00:00 2001 From: Dhenain Ambroise Date: Wed, 3 Jun 2020 15:13:20 +0200 Subject: [PATCH] Fix "TypeError: Cannot destructure property 'message' of 'error' as it is undefined." --- src/components/errors/ErrorDebug.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/errors/ErrorDebug.tsx b/src/components/errors/ErrorDebug.tsx index 7a5fa67e5..5d5a7344c 100644 --- a/src/components/errors/ErrorDebug.tsx +++ b/src/components/errors/ErrorDebug.tsx @@ -16,7 +16,7 @@ type Props = { */ const ErrorDebug = (props: Props): JSX.Element => { const { error, context }: Props = props; - const { message, stack } = error; + const { message, stack } = error || {}; let stringifiedContext; try {