Skip to content

Commit 937e2eb

Browse files
committed
Merge pull request #11 from gazliddon/master
Corection of documenation
2 parents 9bf9521 + cdb18e8 commit 937e2eb

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ For convenience, the 2 most useful callbacks can be shortened:
106106
* on**event** - convenience shorthand for onafter**event**
107107
* on**state** - convenience shorthand for onenter**state**
108108

109-
In addition, a generic `onchangestate()` callback can be used to call a single function for _all_ state changes:
109+
In addition, a generic `onstatechange()` callback can be used to call a single function for _all_ state changes:
110110

111111
All callbacks will be passed the same arguments:
112112

@@ -148,7 +148,7 @@ Additionally, they can be added and removed from the state machine at any time:
148148
fsm.ongreen = nil
149149
fsm.onyellow = nil
150150
fsm.onred = nil
151-
fsm.onchangestate = function(event, from, to) print(to) end
151+
fsm.onstatechange = function(event, from, to) print(to) end
152152
```
153153

154154
Asynchronous State Transitions

0 commit comments

Comments
 (0)