Browse Source

fix: Backlogging issue

tags/v1.1.18
Dale 3 weeks ago
parent
commit
9f91f20016
Signed by: Deiru <deiru2k@gmail.com> GPG Key ID: AA250C0277B927E1
2 changed files with 2 additions and 2 deletions
  1. +1
    -1
      src/components/Playback.tsx
  2. +1
    -1
      src/engine/Engine.ts

+ 1
- 1
src/components/Playback.tsx View File

@@ -36,7 +36,7 @@ const Playback = <GS, MT, ST extends string, >({ engine, children, engineConfig
const nextLine = engine.next(state, opt)
if (nextLine) {
const backlog = engine.backlog;
dispatch(setState({ backlog: [...backlog, ...nextLine].filter(R.identity) }))
dispatch(setState({ backlog: R.flatten([...backlog, ...nextLine].filter(R.identity)) }))
}
}
};


+ 1
- 1
src/engine/Engine.ts View File

@@ -22,7 +22,7 @@ export class Engine<GS = object, MT = undefined, ST extends string = string> {
if (this.currentNode && this.currentNode?.kind === 'location') {
this.switchLocation(this.currentNode.id);
}
this.store.dispatch(actions.setState({ backlog: [firstLine] }));
this.store.dispatch(actions.setState({ backlog: [...R.flatten(firstLine as unknown as ILine<GS, MT>[][])] }));
}

private get state(): EngineState<GS, MT, ST> {


Loading…
Cancel
Save