From 889d8f51c4deea42749491170a718a1cb5eabf5e Mon Sep 17 00:00:00 2001 From: Brian Gough Date: Mon, 21 Nov 2016 13:58:08 +0000 Subject: [PATCH] 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. --- services/web/public/coffee/ide/editor/Document.coffee | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/services/web/public/coffee/ide/editor/Document.coffee b/services/web/public/coffee/ide/editor/Document.coffee index 9226473387..17b1d9e28f 100644 --- a/services/web/public/coffee/ide/editor/Document.coffee +++ b/services/web/public/coffee/ide/editor/Document.coffee @@ -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