fix: Error when viewing text component in RAW HTML (#1869)
This commit is contained in:
committed by
GitHub
parent
d92b27ee93
commit
65aca04708
@@ -100,7 +100,7 @@ export const createCodeMirrorDomNode = ({
|
||||
}) => {
|
||||
// eslint-disable-next-line react-hooks/rules-of-hooks
|
||||
useEffect(() => {
|
||||
const languageExtension = CODEMIRROR_LANGUAGES[lang]();
|
||||
const languageExtension = CODEMIRROR_LANGUAGES[lang] ? CODEMIRROR_LANGUAGES[lang]() : xml();
|
||||
const cleanText = cleanHTML({ initialText });
|
||||
const newState = EditorState.create({
|
||||
doc: cleanText,
|
||||
|
||||
Reference in New Issue
Block a user