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

This commit is contained in:
James Allen 2016-05-26 13:55:22 +01:00
parent 0175a86d4c
commit 39e57a9886

View file

@ -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
} }