mirror of
https://github.com/ianstormtaylor/slate.git
synced 2025-08-30 02:19:52 +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 })
|
||||
|
||||
// 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()
|
||||
|
Reference in New Issue
Block a user