mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-11 14:01:49 +00:00
double-events fix
This commit is contained in:
parent
1a4c70d21a
commit
cbdc151373
1 changed files with 3 additions and 1 deletions
|
|
@ -131,7 +131,9 @@ events = {
|
||||||
}
|
}
|
||||||
|
|
||||||
function events.on(event, func)
|
function events.on(event, func)
|
||||||
events.handlers[event] = events.handlers[event] or {}
|
-- why an array? length is always = 1
|
||||||
|
-- FIXME: temporary fixed
|
||||||
|
events.handlers[event] = {} -- events.handlers[event] or {}
|
||||||
table.insert(events.handlers[event], func)
|
table.insert(events.handlers[event], func)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue