Skip to content

Conversation

@seren5240
Copy link
Contributor

fixes #15808

Fixed the actual state corruption and also removed non-null assertion to improve future type safety.

treeOps.updateAll(this.ctrl.tree.root, n => {
n.gamebook = n.gamebook || {};
if (n.shapes) n.gamebook.shapes = n.shapes.slice(0);
});
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This needs to take place before the following line or clicking back out of the analysis board causes a null gamebook where we expect a gamebook object.

@ornicar ornicar merged commit d8d1437 into lichess-org:master Sep 14, 2024
@ornicar
Copy link
Collaborator

ornicar commented Sep 14, 2024

nice one, thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Interactive lesson inconsistent state

2 participants