We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6cc6e60 commit b5fd9fdCopy full SHA for b5fd9fd
src/component/common/editor/main/CollarCodeEditor.tsx
@@ -108,12 +108,17 @@ const CollarCodeEditor: React.FC<EditorProps> = (props: EditorProps) => {
108
}
109
setEditorInstance(editorView);
110
curSubYDoc.load();
111
- if (curEditorRootDoc) {
+ let existDoc = curEditorRootDoc
112
+ ?.getMap("texhubsubdoc")
113
+ .get(curSubYDoc.guid);
114
+ if (curEditorRootDoc && BaseMethods.isNull(existDoc)) {
115
debugger;
116
curEditorRootDoc
117
.getMap("texhubsubdoc")
118
.set(curSubYDoc.guid, curSubYDoc);
119
setCurRootYDoc(curEditorRootDoc);
120
+ } else {
121
+ console.warn("sudocument exists:" + curSubYDoc.guid);
122
123
124
}, [curSubYDoc]);
0 commit comments