-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Closed
Labels
Meta: Help WantedPackage: reactIssues related to the Sentry React SDKIssues related to the Sentry React SDK
Description
Package + Version
-
@sentry/react
Version:
6.15.0
Description
fallback props from ErrorBoundary is defined as
...
error: Error;
componentStack: string | null;
eventId: string | null;
...When fallback is called, eventId and componentStack cannot be null because error is not null and error, eventId, componentStack are set at the same time.
Proper types:
...
error: Error;
componentStack: string | null;
eventId: string | null;
...Instead of:
// https://github.com/getsentry/sentry-javascript/blob/6.15.0/packages/react/src/errorboundary.tsx#L131
fallback({ error, componentStack, resetError: this.resetErrorBoundary, eventId });it should be:
fallback({ error, componentStack!, resetError: this.resetErrorBoundary, eventId! });because you know eventId and componentStack are not null.
ildevelop
Metadata
Metadata
Assignees
Labels
Meta: Help WantedPackage: reactIssues related to the Sentry React SDKIssues related to the Sentry React SDK