mirror of
https://github.com/ianstormtaylor/slate.git
synced 2025-02-13 11:44:55 +01:00
Remove value
from operation.fromJSON
(#1451)
* Remove `value` from `operation.fromJSON` Value is only used for local undo / redo, so it shouldn't be serialized along with the rest of the data. * Continue to parse a specified `value` into an Operation
This commit is contained in:
parent
a3d91b6daa
commit
8be1f9f3a1
@ -103,6 +103,7 @@ class Operation extends Record(DEFAULTS) {
|
|||||||
// for providing the local-only invert behavior for the history stack.
|
// for providing the local-only invert behavior for the history stack.
|
||||||
if (key == 'document') continue
|
if (key == 'document') continue
|
||||||
if (key == 'selection') continue
|
if (key == 'selection') continue
|
||||||
|
if (key == 'value') continue
|
||||||
if (key == 'node' && type != 'insert_node') continue
|
if (key == 'node' && type != 'insert_node') continue
|
||||||
|
|
||||||
throw new Error(`\`Operation.fromJSON\` was passed a "${type}" operation without the required "${key}" attribute.`)
|
throw new Error(`\`Operation.fromJSON\` was passed a "${type}" operation without the required "${key}" attribute.`)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user