$undoManager.toJSON() should not include action "removeFolds"
alexsch01 opened this issue · comments
Describe the bug
JSON.stringify(editor.session.$undoManager.toJSON()) will lead to a "Converting circular structure to JSON" error in certain circumstances
Expected Behavior
It should never lead to the "Converting circular structure to JSON" error
Reproduction Steps
-
Type in the editor:
{
}
- Click on the fold code button
- Press CTRL+A
- Press Backspace
- Click on the TEST button
An alert with the following message gets shown [trying to do JSON.stringify(editor.session.$undoManager.toJSON())]
TypeError: Converting circular structure to JSON
--> starting at object with constructor 't'
| property 'foldLine' -> object with constructor 'e'
| property 'folds' -> object with constructor 'Array'
--- index 0 closes the circle
Additional Information/Context
output of editor.session.$undoManager.toJSON()
Ace Version / Browser / OS / Keyboard layout
v1.32.7 on Google Chrome