Fix history crash

This commit is contained in:
David Rowe 2017-09-15 09:54:55 +12:00
parent 378793d18e
commit f1572a165a

View file

@ -90,6 +90,7 @@ History = (function () {
// Limit the number of history items.
if (history.length >= MAX_HISTORY_ITEMS) {
history.splice(0, history.length - MAX_HISTORY_ITEMS + 1);
undoPosition = history.length - 1;
}
history.push({ undoData: undoData, redoData: redoData });