Skip to content

Commit

Permalink
fix: add 'showDialog' to props
Browse files Browse the repository at this point in the history
  • Loading branch information
trevor-anderson committed Jun 28, 2023
1 parent 18f5b55 commit 944bb23
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/components/ErrorBoundary/ErrorBoundary.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,15 @@ export class ErrorBoundary extends React.Component<ErrorBoundaryProps, ErrorBoun
};

public static getDerivedStateFromError(error: Error) {
logger.error(error, "ErrorBoundary.getDerivedStateFromError");
return { hasError: true };
}

public override componentDidCatch(error: Error, errorInfo: React.ErrorInfo) {
logger.error(
`${error}
${errorInfo}`,
`Sentry.ErrorBoundary${this.props?.identifier ? `:${this.props.identifier}` : null}`
`ErrorBoundary${this.props?.identifier ? `:${this.props.identifier}` : null}`
);
}

Expand All @@ -39,6 +40,7 @@ export class ErrorBoundary extends React.Component<ErrorBoundaryProps, ErrorBoun
}

export type ErrorBoundaryProps = React.ComponentProps<typeof Sentry.ErrorBoundary> & {
showDialog?: boolean;
identifier?: string;
children?: React.ReactNode;
};
Expand Down

0 comments on commit 944bb23

Please sign in to comment.