util.events: Change from nil to false to indicate adding a global wrapper
authorMatthew Wild <mwild1@gmail.com>
Tue, 28 Apr 2015 13:19:28 +0000 (14:19 +0100)
committerMatthew Wild <mwild1@gmail.com>
Tue, 28 Apr 2015 13:19:28 +0000 (14:19 +0100)
util/events.lua

index d5a7359c28b0a4378f2f7bb1002ac9017e8cd008..79de1151741a3e6f2dd0220e9ab4a0b1ebceafc9 100644 (file)
@@ -93,7 +93,7 @@ function new()
        end
        local function add_wrapper(event_name, wrapper)
                local w;
-               if event_name == nil then
+               if event_name == false then
                        w = global_wrappers;
                        if not w then
                                w = {};
@@ -110,7 +110,7 @@ function new()
        end
        local function remove_wrapper(event_name, wrapper)
                local w;
-               if event_name == nil then
+               if event_name == false then
                        w = global_wrappers;
                else
                        w = wrappers[event_name];