Просмотр исходного кода

Merge pull request #1703 from sharelatex/bg-handle-send-before-rejoin

handle error gracefully when client has not yet joined project

GitOrigin-RevId: 21e337f6adbbb23a2126eaf4fa026c78178efef0
Brian Gough 7 лет назад
Родитель
Сommit
0eaf6db2d6
1 измененных файлов с 4 добавлено и 0 удалено
  1. 4 0
      services/web/public/src/ide/editor/Document.js

+ 4 - 0
services/web/public/src/ide/editor/Document.js

@@ -665,6 +665,10 @@ define([
         }
         meta.doc_id = this.doc_id
         sl_console.log('ShareJS error', error, meta)
+        if (error.message === 'no project_id found on client') {
+          sl_console.log('ignoring error, will wait to join project')
+          return
+        }
         if (typeof ga === 'function') {
           ga(
             'send',