Revert "Make very simple shallow copy of aceDelta when there's an undo error"

This reverts commit 1d77a95f17dde6f8792bca1989d65952474b144c.
This commit is contained in:
James Allen 2016-10-31 16:56:49 +00:00
parent 26410690da
commit c2eb49845f

View file

@ -233,11 +233,16 @@ define [
start = aceDelta.start
if !start?
error = new Error("aceDelta had no start event.")
inspectedAceDelta = {}
for key, value of aceDelta
inspectedAceDelta[key] = typeof value
JSONstringifyWithCycles = (o) ->
seen = []
return JSON.stringify o, (k,v) ->
if (typeof v == 'object')
if ( !seen.indexOf(v) )
return '__cycle__'
seen.push(v);
return v
Raven?.captureException(error, {
aceDelta: JSON.stringify(inspectedAceDelta)
aceDelta: JSONstringifyWithCycles(aceDelta)
})
throw error
linesBefore = docLines.slice(0, start.row)