Skip to content

Commit 96fc10e

Browse files
fix: 🐛 Add Lua 5.1 compatibility for unpack function (#30)
* Ensures backward compatibility with Lua 5.1 by aliasing unpack to table.unpack
1 parent 1890840 commit 96fc10e

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

statemachine.lua

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@ machine.__index = machine
44
local NONE = "none"
55
local ASYNC = "async"
66

7+
-- Compatibility for Lua 5.1 vs 5.2+
8+
local unpack = unpack or table.unpack
9+
710
local function call_handler(handler, params)
811
if handler then
912
return handler(unpack(params))

0 commit comments

Comments
 (0)