mirror of
https://github.com/ianstormtaylor/slate.git
synced 2025-02-13 11:44:55 +01:00
fix to only merge in history when possible
This commit is contained in:
parent
fe640f7afb
commit
485bfb6aa4
@ -130,7 +130,7 @@ class History extends Record(DEFAULTS) {
|
||||
debug('save', { operation, merge })
|
||||
|
||||
// If the `merge` flag is true, add the operation to the previous batch.
|
||||
if (merge) {
|
||||
if (merge && prevBatch) {
|
||||
const batch = prevBatch.slice()
|
||||
batch.push(operation)
|
||||
undos = undos.pop()
|
||||
|
Loading…
x
Reference in New Issue
Block a user