Skip to content

Commit

Permalink
Fix "TypeError: Cannot destructure property 'message' of 'error' as i…
Browse files Browse the repository at this point in the history
…t is undefined."
  • Loading branch information
Vadorequest committed Jun 3, 2020
1 parent ae1bf31 commit adca1e7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/components/errors/ErrorDebug.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ type Props = {
* @param props
*/
const ErrorDebug = (props: Props): JSX.Element => {
const { error, context }: Props = props;
const { message, stack } = error;
const { error, context }: Props = props || {};
const { message, stack } = error || {};

let stringifiedContext;
try {
Expand Down

0 comments on commit adca1e7

Please sign in to comment.