1
0
mirror of https://github.com/ianstormtaylor/slate.git synced 2025-02-01 05:16:10 +01:00

serialize path as well in Operation.toJSON (#2227)

* serialize path as well in Operation.toJSON

* add on the next statement instead
This commit is contained in:
Bryan Haakman 2018-10-04 18:39:34 +02:00 committed by Ian Storm Taylor
parent dda0628c04
commit 10e8ab4db6

View File

@ -249,7 +249,13 @@ class Operation extends Record(DEFAULTS) {
if (key == 'value') continue
if (key == 'node' && type != 'insert_node') continue
if (key == 'mark' || key == 'marks' || key == 'node') {
if (
key == 'mark' ||
key == 'marks' ||
key == 'node' ||
key == 'path' ||
key == 'newPath'
) {
value = value.toJSON()
}