Skip to content

Commit

Permalink
Fix warning about forwardRef accepting exactly two params
Browse files Browse the repository at this point in the history
This was the error:
```
Warning: forwardRef render functions accept exactly two parameters: props and ref. Did you forget to use the ref parameter?
```
  • Loading branch information
gabescarbrough committed May 7, 2024
1 parent 31ab6ed commit 685385a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/RichTextEditor/RichTextEditor.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ const RichTextEditor = forwardRef((
placeholder,
customExtensions = [],
}: RichTextEditorProps,
ref: ForwardedRef<RichTextEditorRef> = null,
ref: ForwardedRef<RichTextEditorRef>,
) => {
const oneLineExtension = isOneLine ? [OneLineLimit] : [];

Expand Down

0 comments on commit 685385a

Please sign in to comment.