diff options
author | mitchell <70453897+667e-11@users.noreply.github.com> | 2016-03-29 10:09:11 -0400 |
---|---|---|
committer | mitchell <70453897+667e-11@users.noreply.github.com> | 2016-03-29 10:09:11 -0400 |
commit | f6705b546d2f037302f2d2d95bae507e78b29d59 (patch) | |
tree | e3c063978f27580b4c235fdf74d4bbbf0b01a554 | |
parent | b014aa83ef9df4f0e927528083d5e43e2eb14188 (diff) |
No need to pack and unpack `...`; core/events.lua
-rw-r--r-- | core/events.lua | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/core/events.lua b/core/events.lua index 3192b89b..ceba125e 100644 --- a/core/events.lua +++ b/core/events.lua @@ -308,9 +308,8 @@ function M.emit(event, ...) assert(event, _L['Undefined event name']) local h = handlers[event] if not h then return end - local pcall, table_unpack, type = pcall, table.unpack, type for i = 1, #h do - local ok, result = pcall(h[i], table_unpack{...}) + local ok, result = pcall(h[i], ...) if not ok then if not error_emitted then error_emitted = true |