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