From 4d87a9b2d14f5b7c0d4e95e2ad4fc9d454774b9f Mon Sep 17 00:00:00 2001 From: Jesse McDonald Date: Fri, 8 May 2020 12:01:45 -0500 Subject: [PATCH] fix for undo state becoming corrupted after redo --- js/pacosako.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/pacosako.js b/js/pacosako.js index 4d7c939..ff32862 100644 --- a/js/pacosako.js +++ b/js/pacosako.js @@ -1129,7 +1129,7 @@ class Game { const savedRedo = this._redo; /* copy all the properties from the saved prior game to this one */ - Object.assign(this, this._undo); + Object.assign(this, new Game(this._undo)); /* restore the original redo history and add the undone move */ this._redo = savedRedo;