HelperLib: events fixes

This commit is contained in:
Van
2026-04-03 21:36:55 +03:00
parent 7af83a87d8
commit 162f8d2639

View File

@@ -21,7 +21,9 @@ end
---@param ... any
function Events.call(eventName, ...)
local callbacks = registeredEvents[eventName]
assert(callbacks ~= nil, ('Event %s does not exist'):format(eventName))
if callbacks == nil then
return
end
for _, func in ipairs(callbacks) do
func(eventName, ...)