mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-07 20:31:06 -05:00
Revert "Make very simple shallow copy of aceDelta when there's an undo error"
This reverts commit 1d77a95f17dde6f8792bca1989d65952474b144c.
This commit is contained in:
parent
26410690da
commit
c2eb49845f
1 changed files with 9 additions and 4 deletions
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue