From 5f0009605cf71ce1acc2246ad6463ef618b139bb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Enrique=20Garc=C3=ADa?= Date: Thu, 27 Oct 2011 00:24:25 +0200 Subject: [PATCH] refactor --- beholder.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/beholder.lua b/beholder.lua index bb01072..364e66f 100644 --- a/beholder.lua +++ b/beholder.lua @@ -53,8 +53,8 @@ function beholder:stopObserving(id) end function beholder:trigger(event,...) - local actions = self._nodes[event] or {} - for _,action in pairs(actions) do + local node = findNode(self, event) or {} + for _,action in pairs(node) do action(...) end end