diff --git a/src/components/error-boundary/error-boundary.tsx b/src/components/error-boundary/error-boundary.tsx index becc3aa1d..1b8cdf6d4 100644 --- a/src/components/error-boundary/error-boundary.tsx +++ b/src/components/error-boundary/error-boundary.tsx @@ -4,7 +4,7 @@ SPDX-License-Identifier: AGPL-3.0-only */ -import type { ErrorInfo, ReactElement, ReactNodeArray } from 'react' +import type { ErrorInfo, ReactNode } from 'react' import React, { Component } from 'react' import { Button, Container } from 'react-bootstrap' import links from '../../links.json' @@ -38,7 +38,7 @@ export class ErrorBoundary extends Component { window.location.reload() } - render(): ReactElement | undefined | null | string | number | boolean | Record | ReactNodeArray { + render(): ReactNode | undefined { if (this.state.hasError) { return ( @@ -62,7 +62,8 @@ export class ErrorBoundary extends Component { ) + } else { + return this.props.children } - return this.props.children } }