make Document _onError handler more robust

replace console.error with sl_console.log to prevent browser crashing
before exiting document if console object does not exist.
This commit is contained in:
Brian Gough 2016-11-21 13:58:08 +00:00
parent da1be67aff
commit 889d8f51c4

View file

@ -310,7 +310,7 @@ define [
_onError: (error, meta = {}) ->
meta.doc_id = @doc_id
console.error "ShareJS error", error, meta
sl_console.log "ShareJS error", error, meta
ga?('send', 'event', 'error', "shareJsError", "#{error.message} - #{@ide.socket.socket.transport.name}" )
@doc?.clearInflightAndPendingOps()
@trigger "error", error, meta