فهرست منبع

Throw fatal error if document update actually returns an error from the real-time service

James Allen 10 سال پیش
والد
کامیت
39e57a9886
1فایلهای تغییر یافته به همراه2 افزوده شده و 1 حذف شده
  1. 2 1
      services/web/public/coffee/ide/editor/ShareJsDoc.coffee

+ 2 - 1
services/web/public/coffee/ide/editor/ShareJsDoc.coffee

@@ -34,7 +34,8 @@ define [
 					if window.dropUpdates? and Math.random() < window.dropUpdates
 					if window.dropUpdates? and Math.random() < window.dropUpdates
 						sl_console.log "Simulating a lost update", update
 						sl_console.log "Simulating a lost update", update
 						return
 						return
-					@socket.emit "applyOtUpdate", @doc_id, update
+					@socket.emit "applyOtUpdate", @doc_id, update, (error) =>
+						return @_handleError(error) if error?
 				state: "ok"
 				state: "ok"
 				id:    @socket.socket.sessionid
 				id:    @socket.socket.sessionid
 			}
 			}