Skip to content

Commit

Permalink
set initial state
Browse files Browse the repository at this point in the history
  • Loading branch information
miunau committed Sep 6, 2024
1 parent cb2abde commit 8532965
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "svelte5-fsm",
"version": "1.0.3",
"version": "1.0.4",
"scripts": {
"dev": "vite dev",
"build": "vite build && npm run package",
Expand Down
3 changes: 2 additions & 1 deletion src/lib/fsm.svelte.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/**
* Finite State Machine for Svelte 5.
* Version: 1.0.3
* Version: 1.0.4
* Author: miunau <miunau+npm@miunau.com>
* License: MIT
*/
Expand Down Expand Up @@ -54,6 +54,7 @@ export class FSM<
*/
async start(context?: Partial<ContextType>): Promise<void> {
this.log('START:', this.initialState);
this.state = this.initialState;
await this.transition(this.initialState, context);
}

Expand Down

0 comments on commit 8532965

Please sign in to comment.