فهرست منبع

fix get text insert

ryoji-s 2 سال پیش
والد
کامیت
1011a27065
1فایلهای تغییر یافته به همراه1 افزوده شده و 1 حذف شده
  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 currentCodeMirrorText = currentYdoc.getText('codemirror').toString();
         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)