From 0c4915da62a96bf6db20377ce11fa887b6271ad9 Mon Sep 17 00:00:00 2001 From: mitchell <70453897+667e-11@users.noreply.github.com> Date: Sat, 2 Apr 2016 23:35:15 -0400 Subject: Code cleanup. Do not use `ipairs()` and use more consistent variable names among other things. --- core/events.lua | 1 + 1 file changed, 1 insertion(+) (limited to 'core/events.lua') diff --git a/core/events.lua b/core/events.lua index ceba125e..5b7c390a 100644 --- a/core/events.lua +++ b/core/events.lua @@ -270,6 +270,7 @@ local handlers = {} -- @see disconnect -- @name connect function M.connect(event, f, index) + -- Note: cannot assert() here since _L is undefined early in init process. if not event then error(_L['Undefined event name']) end if not handlers[event] then handlers[event] = {} end if handlers[event][f] then M.disconnect(event, f) end -- cgit v1.2.3