Skip to content

Commit

Permalink
fix: state switching
Browse files Browse the repository at this point in the history
  • Loading branch information
fulcanelly committed Oct 9, 2024
1 parent 127a892 commit 68417cf
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "chat-toolkit",
"version": "0.0.5",
"version": "0.1.5",
"description": "",
"author": "",
"private": false,
Expand Down
1 change: 1 addition & 0 deletions src/state/state.ts
Original file line number Diff line number Diff line change
Expand Up @@ -401,6 +401,7 @@ async function handleStateSwitch(e: SwitchStateError, context: Context, setState
await context.manage.state.delete()

await context.manage.state.save(e.stateToSwitch, e.state_arguments)
setStateData(context.allStates[e.stateToSwitch] as any, e.state_arguments)
} catch (e) {
console.error(e)
throw e
Expand Down

0 comments on commit 68417cf

Please sign in to comment.