Closed Siderite closed 2 months ago
Shouldn't the offending line be something that relates to the Analysis Button's logic instead? It all works seamlessly until the Analysis Button switches gamebooks.
Extra information:
This bug can be reproduced in any interactive study whenever there is no content in the text box under "When any other wrong move is played:" for the step where the wrong move is played. But if there is content in this text box it works with no errors.
Exact URL of where the bug happened
https://lichess.org/study/TA3t1HLK/f8o2kJYW
Steps to reproduce the bug
What did you expect to happen?
no errors
What happened instead?
error trying to read the "deviation" property of the first node's gamebook, which does not exist.
Operating system
Windows 11
Browser and version (or alternate access method)
Brave
Additional information
Offending line is here: https://github.com/lichess-org/lila/blob/d6815dadd30b16da80a3a6bc27f3095c9f3678a4/ui/analyse/src/study/gamebook/gamebookPlayCtrl.ts#L57
Details: