Explorar o código

fix get text insert

ryoji-s %!s(int64=2) %!d(string=hai) anos
pai
achega
1011a27065
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      apps/app/src/server/service/socket-io.js

+ 1 - 1
apps/app/src/server/service/socket-io.js

@@ -191,7 +191,7 @@ class SocketIoService {
         const persistedCodeMirrorText = persistedYdoc.getText('codemirror').toString();
         const persistedCodeMirrorText = persistedYdoc.getText('codemirror').toString();
         const currentCodeMirrorText = currentYdoc.getText('codemirror').toString();
         const currentCodeMirrorText = currentYdoc.getText('codemirror').toString();
         if (persistedCodeMirrorText === '' && currentCodeMirrorText === '') {
         if (persistedCodeMirrorText === '' && currentCodeMirrorText === '') {
-          currentYdoc.insert(0, initialValue);
+          currentYdoc.getText('codemirror').insert(0, initialValue);
         }
         }
 
 
         // store the new data in db (if there is any: empty update is an array of 0s)
         // store the new data in db (if there is any: empty update is an array of 0s)