Skip to content

Commit

Permalink
Fixed error on format undefined
Browse files Browse the repository at this point in the history
  • Loading branch information
umerfaruk committed Feb 1, 2024
1 parent 7b07522 commit bdf3371
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit bdf3371

Please sign in to comment.