From bdf33717560e1980dd8afff078ad8318464d3b63 Mon Sep 17 00:00:00 2001 From: Omar Faruk Date: Thu, 1 Feb 2024 00:59:08 +0000 Subject: [PATCH] Fixed error on format undefined --- src/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/index.js b/src/index.js index 72029ab..72ad292 100644 --- a/src/index.js +++ b/src/index.js @@ -73,7 +73,7 @@ export default ({ value = EMPTY_CONTENT, }) => { const locale = i18n[configuration.language]; const isRtl = configuration.language == "ur" ? true : false; - const [editorState, setEditorState] = useState(value !== null & value === EMPTY_CONTENT && format == 'markdown'? ' ' : EMPTY_CONTENT); + const [editorState, setEditorState] = useState(value !== null & value === EMPTY_CONTENT && configuration.format == 'markdown'? ' ' : EMPTY_CONTENT); const initialConfig = { namespace: "MyEditor", editorState: configuration.format == "markdown" ? () => value == null ? '' : $convertFromMarkdownString(value, TRANSFORMERS) : value,