mirror of
https://github.com/Foundry376/Mailspring.git
synced 2025-02-25 00:25:03 +08:00
fix(undo): Queuing an empty array should not trigger undo-redo store
This commit is contained in:
parent
45af00146b
commit
594ed644fd
1 changed files with 2 additions and 0 deletions
|
@ -23,7 +23,9 @@ class UndoRedoStore
|
|||
NylasEnv.commands.add('body', {'core:redo': @redo })
|
||||
|
||||
_onQueue: (tasks) =>
|
||||
return unless tasks
|
||||
tasks = [tasks] unless tasks instanceof Array
|
||||
return unless tasks.length > 0
|
||||
undoable = _.every tasks, (t) -> t.canBeUndone()
|
||||
|
||||
if undoable
|
||||
|
|
Loading…
Reference in a new issue