analyse/gamebook: Fix analyse toggle when out of mainline
parent
034c94d68e
commit
366bdccd30
|
@ -41,8 +41,10 @@ export default class GamebookPlayCtrl {
|
|||
},
|
||||
parPath = treePath.init(this.root.path),
|
||||
parNode = this.root.tree.nodeAtPath(parPath);
|
||||
if (!this.root.onMainline && !this.root.tree.pathIsMainline(parPath)) return;
|
||||
if (this.root.onMainline && !node.children[0]) {
|
||||
if (
|
||||
(this.root.onMainline && !node.children[0]) ||
|
||||
(!this.root.onMainline && !this.root.tree.pathIsMainline(parPath))
|
||||
) {
|
||||
state.feedback = 'end';
|
||||
} else if (this.isMyMove()) {
|
||||
state.feedback = 'play';
|
||||
|
|
Loading…
Reference in New Issue