mirror of
https://github.com/overleaf/overleaf.git
synced 2024-12-24 03:33:27 +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 = {}) ->
|
||||
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
|
||||
|
|
Loading…
Reference in a new issue