From f1572a165a83bf17c849612292549d07dbe15182 Mon Sep 17 00:00:00 2001 From: David Rowe Date: Fri, 15 Sep 2017 09:54:55 +1200 Subject: [PATCH] Fix history crash --- scripts/vr-edit/modules/history.js | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/vr-edit/modules/history.js b/scripts/vr-edit/modules/history.js index 5fb0712db3..039f078ad0 100644 --- a/scripts/vr-edit/modules/history.js +++ b/scripts/vr-edit/modules/history.js @@ -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 });