Add in extra sentry logging for undefined start in aceDelta

This commit is contained in:
James Allen 2016-10-18 16:37:40 +01:00
parent 1beca53b3d
commit 05cd6e69a7

View file

@ -231,6 +231,12 @@ define [
_aceDeltaToSimpleDelta: (aceDelta, docLines) -> _aceDeltaToSimpleDelta: (aceDelta, docLines) ->
start = aceDelta.start 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) linesBefore = docLines.slice(0, start.row)
position = position =
linesBefore.join("").length + # full lines linesBefore.join("").length + # full lines