Unverified Commit af9298cc authored by François Martin's avatar François Martin Committed by GitHub

Fix TypeScript type error in example code (#84041)

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
```
Co-authored-by: 's avatarJoseph <joseph.chamochumbi@vercel.com>
parent 2d96b966
......@@ -219,7 +219,7 @@ export class GracefullyDegradingErrorBoundary extends Component<
ErrorBoundaryProps,
ErrorBoundaryState
> {
private contentRef: React.RefObject<HTMLDivElement>
private contentRef: React.RefObject<HTMLDivElement | null>
constructor(props: ErrorBoundaryProps) {
super(props)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment