Skip to content

Commit

Permalink
Fix undo/redo history affecting multiple files after switching in Cod…
Browse files Browse the repository at this point in the history
…eMirror.
  • Loading branch information
swk777 committed Oct 22, 2024
1 parent fa491ed commit 87b499c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/web/src/components/apps/editor.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ export function CodeEditor({
const extensions = languageExtension ? [languageExtension] : [];

return (
<CodeMirror value={source} theme={codeTheme} extensions={extensions} onChange={onChange} />
<CodeMirror key={path} value={source} theme={codeTheme} extensions={extensions} onChange={onChange} />
);
}

Expand Down

0 comments on commit 87b499c

Please sign in to comment.