mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2025-02-17 07:13:13 +00:00
Fix type error in error-boundary.tsx
Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de>
This commit is contained in:
parent
18026fdd94
commit
68de268515
1 changed files with 4 additions and 3 deletions
|
@ -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<string, unknown> | ReactNodeArray {
|
||||
render(): ReactNode | undefined {
|
||||
if (this.state.hasError) {
|
||||
return (
|
||||
<Container className='text-light d-flex flex-column mvh-100'>
|
||||
|
@ -62,7 +62,8 @@ export class ErrorBoundary extends Component {
|
|||
</div>
|
||||
</Container>
|
||||
)
|
||||
} else {
|
||||
return this.props.children
|
||||
}
|
||||
return this.props.children
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue