Skip to content

Commit

Permalink
restore previous condition
Browse files Browse the repository at this point in the history
  • Loading branch information
jeremyphilemon committed Jan 8, 2025
1 parent 8503f67 commit f014842
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions components/code-editor.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -75,10 +75,7 @@ function PureCodeEditor({ content, saveContent, status }: EditorProps) {
if (editorRef.current && content) {
const currentContent = editorRef.current.state.doc.toString();

if (
status === 'streaming' ||
(currentContent.length == 0 && content.length > 0)
) {
if (status === 'streaming' || currentContent !== content) {
const transaction = editorRef.current.state.update({
changes: {
from: 0,
Expand Down

0 comments on commit f014842

Please sign in to comment.