From 05cd6e69a736a8a229388bc8a685a8c91f233c3f Mon Sep 17 00:00:00 2001 From: James Allen Date: Tue, 18 Oct 2016 16:37:40 +0100 Subject: [PATCH] Add in extra sentry logging for undefined start in aceDelta --- .../ide/editor/directives/aceEditor/undo/UndoManager.coffee | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/services/web/public/coffee/ide/editor/directives/aceEditor/undo/UndoManager.coffee b/services/web/public/coffee/ide/editor/directives/aceEditor/undo/UndoManager.coffee index 1f6b536046..9c61ce983d 100644 --- a/services/web/public/coffee/ide/editor/directives/aceEditor/undo/UndoManager.coffee +++ b/services/web/public/coffee/ide/editor/directives/aceEditor/undo/UndoManager.coffee @@ -231,6 +231,12 @@ define [ _aceDeltaToSimpleDelta: (aceDelta, docLines) -> start = aceDelta.start + if !start? + error = new Error("aceDelta had no start event.") + Raven?.captureException(error, { + aceDelta: JSON.stringify(aceDelta) + }) + throw error linesBefore = docLines.slice(0, start.row) position = linesBefore.join("").length + # full lines