mirror of
https://github.com/overleaf/overleaf.git
synced 2025-01-12 01:31:31 +00:00
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:
parent
da1be67aff
commit
889d8f51c4
1 changed files with 1 additions and 1 deletions
|
@ -310,7 +310,7 @@ define [
|
||||||
|
|
||||||
_onError: (error, meta = {}) ->
|
_onError: (error, meta = {}) ->
|
||||||
meta.doc_id = @doc_id
|
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}" )
|
ga?('send', 'event', 'error', "shareJsError", "#{error.message} - #{@ide.socket.socket.transport.name}" )
|
||||||
@doc?.clearInflightAndPendingOps()
|
@doc?.clearInflightAndPendingOps()
|
||||||
@trigger "error", error, meta
|
@trigger "error", error, meta
|
||||||
|
|
Loading…
Reference in a new issue