Shun Miyazawa 1 год назад
Родитель
Сommit
59bbac2760

+ 0 - 1
packages/editor/src/client/components/CodeMirrorEditorReadOnly.tsx

@@ -68,7 +68,6 @@ export const CodeMirrorEditorReadOnly = ({ markdown, onScroll }: Props): JSX.Ele
       hideToolbar
       editorKey={GlobalCodeMirrorEditorKey.READONLY}
       onScroll={onScroll}
-      cmProps={{}} // Do not pass undefined when initializing useCodeMirrorEditorIsolated
     />
   );
 };

+ 1 - 1
packages/editor/src/client/stores/codemirror-editor.ts

@@ -33,7 +33,7 @@ export const useCodeMirrorEditorIsolated = (
 
   const newData = useCodeMirrorEditor(mergedProps);
 
-  const shouldUpdate = swrKey != null && container != null && props != null && (
+  const shouldUpdate = swrKey != null && container != null && (
     currentData == null
     || (isValid(newData) && !isDeepEquals(currentData, newData))
   );