fix for undo state becoming corrupted after redo

This commit is contained in:
Jesse D. McDonald 2020-05-08 12:01:45 -05:00
parent 7842058370
commit 4d87a9b2d1
1 changed files with 1 additions and 1 deletions

View File

@ -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;