Fix remaining typescript errors (#2741)

This commit is contained in:
Zane
2025-05-30 12:06:49 -07:00
committed by GitHub
parent 2c0cda7bec
commit 0c042010ff
109 changed files with 1873 additions and 1438 deletions
+2 -2
View File
@@ -51,7 +51,7 @@ export function ErrorUI({ error }: { error: Error }) {
export class ErrorBoundary extends React.Component<
{ children: React.ReactNode },
{ error: Error; hasError: boolean }
{ error: Error | null; hasError: boolean }
> {
constructor(props: { children: React.ReactNode }) {
super(props);
@@ -69,7 +69,7 @@ export class ErrorBoundary extends React.Component<
render() {
if (this.state.hasError) {
return <ErrorUI error={this.state.error} />;
return <ErrorUI error={this.state.error || new Error('Unknown error')} />;
}
return this.props.children;
}