Skip to content

Commit 8862b41

Browse files
committed
Merge pull request #15 from Mikhael-Danilov/patch-1
Actually allow use wildcard '*' in state chart
2 parents 0d4993f + 3bf070e commit 8862b41

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

statemachine.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ end
7474

7575
function machine:can(e)
7676
local event = self.events[e]
77-
local to = event and event.map[self.current]
77+
local to = event and event.map[self.current] or event.map['*']
7878
return to ~= nil, to
7979
end
8080

0 commit comments

Comments
 (0)