🐛 Only add undo entry when undo changes is not empty.

This commit is contained in:
Andrey Antukh 2020-09-14 15:32:55 +02:00 committed by Alonso Torres
parent a1b709a9fd
commit 1bde48730c

View file

@ -79,7 +79,7 @@
(when (and save-undo? (not= uidx ::not-found)) (when (and save-undo? (not= uidx ::not-found))
(rx/of (reset-undo uidx))) (rx/of (reset-undo uidx)))
(when save-undo? (when (and save-undo? (seq undo-changes))
(let [entry {:undo-changes undo-changes (let [entry {:undo-changes undo-changes
:redo-changes changes}] :redo-changes changes}]
(rx/of (append-undo entry)))))))))) (rx/of (append-undo entry))))))))))