Skip to content

Commit

Permalink
Revert "[#61762] Override ytext with initialText if ytext is empty"
Browse files Browse the repository at this point in the history
This reverts commit 0655766.
  • Loading branch information
MaciejWas committed Jul 3, 2024
1 parent f510d38 commit 51d4741
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions src/components/CodeMirror.js
Original file line number Diff line number Diff line change
Expand Up @@ -166,11 +166,6 @@ const CodeMirror = ({ text, id, name, mode, collaboration, spellcheckOpts, highl
if (editorRef.current) return;
if (error) return;

if (ytext?.toString().length === 0 && text.get().length > 0) {
console.warn("[Collaboration] Remote state is empty, overriding with local state");
ytext.insert(0, text.get());
}

if (collaboration.enabled) text.set(ytext.toString());

text.readyToRender();
Expand Down

0 comments on commit 51d4741

Please sign in to comment.