Skip to content

Commit 5ae8530

Browse files
Fix TypeScript type error in example code
Without the `| null`, the following error appears during compilation: ``` TS2322: Type RefObject<HTMLDivElement | null> is not assignable to type RefObject<HTMLDivElement> Type HTMLDivElement | null is not assignable to type HTMLDivElement Type null is not assignable to type HTMLDivElement ```
1 parent d608590 commit 5ae8530

File tree

1 file changed

+1
-1
lines changed
  • docs/01-app/03-api-reference/03-file-conventions

1 file changed

+1
-1
lines changed

docs/01-app/03-api-reference/03-file-conventions/error.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,7 @@ export class GracefullyDegradingErrorBoundary extends Component<
219219
ErrorBoundaryProps,
220220
ErrorBoundaryState
221221
> {
222-
private contentRef: React.RefObject<HTMLDivElement>
222+
private contentRef: React.RefObject<HTMLDivElement | null>
223223

224224
constructor(props: ErrorBoundaryProps) {
225225
super(props)

0 commit comments

Comments
 (0)