fix for undo state becoming corrupted after redo
This commit is contained in:
parent
7842058370
commit
4d87a9b2d1
|
|
@ -1129,7 +1129,7 @@ class Game {
|
||||||
const savedRedo = this._redo;
|
const savedRedo = this._redo;
|
||||||
|
|
||||||
/* copy all the properties from the saved prior game to this one */
|
/* 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 */
|
/* restore the original redo history and add the undone move */
|
||||||
this._redo = savedRedo;
|
this._redo = savedRedo;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue