Skip to content

Commit

Permalink
Fixed error in broadcast method
Browse files Browse the repository at this point in the history
CHANGED:
- Forgot to rename 'child' variable name to 'next' when changing
structure.
  • Loading branch information
Nathan Lam committed Feb 15, 2017
1 parent ca26625 commit f2a2578
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions scene.lua
Original file line number Diff line number Diff line change
Expand Up @@ -259,12 +259,12 @@ function node:broadcast(event_type, ...)
insert_all(self.children, queue)
while qpos <= #queue do
local next = queue[qpos]
if not child:fire(event_type, ...) then
if not next:fire(event_type, ...) then
return
end

if child.children then
insert_all(child.children, queue)
if next.children then
insert_all(next.children, queue)
end

qpos = qpos + 1
Expand Down

0 comments on commit f2a2578

Please sign in to comment.