From b10fb00f523bfc53a1a7545c6d28939e2b938265 Mon Sep 17 00:00:00 2001 From: Tom Moor Date: Tue, 16 Nov 2021 18:43:46 -0800 Subject: [PATCH] fix: extensions prop should be optional --- src/index.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/index.tsx b/src/index.tsx index 1c0b9da79..29eed9fba 100644 --- a/src/index.tsx +++ b/src/index.tsx @@ -89,7 +89,7 @@ export type Props = { value?: string; defaultValue: string; placeholder: string; - extensions: Extension[]; + extensions?: Extension[]; disableExtensions?: ( | "strong" | "code_inline" @@ -411,7 +411,7 @@ class RichMarkdownEditor extends React.PureComponent { } return true; }), - ...this.props.extensions, + ...(this.props.extensions || []), ], this );