1
0
mirror of https://github.com/ianstormtaylor/slate.git synced 2025-09-01 11:12:42 +02:00
This commit is contained in:
Ian Storm Taylor
2016-10-18 09:02:21 -07:00
parent bd26153dfb
commit 4242392099

View File

@@ -51,8 +51,13 @@ class Transform {
*/ */
apply(options = {}) { apply(options = {}) {
let transform = this
// Ensure that the state is normalized.
transform = transform.normalize()
let { merge, save, isNative = false } = options let { merge, save, isNative = false } = options
let { state, operations } = this let { state, operations } = transform
let { history } = state let { history } = state
let { undos, redos } = history let { undos, redos } = history
const previous = undos.peek() const previous = undos.peek()