Skip to content

Commit

Permalink
double-events fix
Browse files Browse the repository at this point in the history
  • Loading branch information
MihailRis committed Apr 3, 2024
1 parent 160cbdc commit bd5421d
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion res/scripts/stdlib.lua
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,9 @@ events = {
}

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)
end

Expand Down

0 comments on commit bd5421d

Please sign in to comment.