diff --git a/src-web/components/core/Editor/Editor.tsx b/src-web/components/core/Editor/Editor.tsx index dff95906..7e89d3e6 100644 --- a/src-web/components/core/Editor/Editor.tsx +++ b/src-web/components/core/Editor/Editor.tsx @@ -48,7 +48,7 @@ export function Editor({ defaultValue, forceUpdateKey, ...props }: EditorProps) // NOTE: This was originally done to fix a bug where the editor would unmount // and remount after the first change event, something to do with React // StrictMode. This fixes it, though, and actually makes more sense - const fixedDefaultValue = useMemo(() => defaultValue, [forceUpdateKey]); + const fixedDefaultValue = useMemo(() => defaultValue, [forceUpdateKey, props.type]); return <_Editor defaultValue={fixedDefaultValue} {...props} />; }