Skip to content

Commit 87b499c

Browse files
committed
Fix undo/redo history affecting multiple files after switching in CodeMirror.
1 parent fa491ed commit 87b499c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/web/src/components/apps/editor.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ export function CodeEditor({
2525
const extensions = languageExtension ? [languageExtension] : [];
2626

2727
return (
28-
<CodeMirror value={source} theme={codeTheme} extensions={extensions} onChange={onChange} />
28+
<CodeMirror key={path} value={source} theme={codeTheme} extensions={extensions} onChange={onChange} />
2929
);
3030
}
3131

0 commit comments

Comments
 (0)