mirror of
https://github.com/Keyslam-Group/Concord.git
synced 2025-09-06 22:27:53 -04:00
Added preventDefaults in beforeEmit
This commit is contained in:
parent
b0fdb74d82
commit
15a09cd7e6
1 changed files with 2 additions and 1 deletions
|
@ -324,8 +324,9 @@ function World:emit(functionName, ...)
|
||||||
|
|
||||||
if not self.__ignoreEmits and Type.isCallable(self.beforeEmit) then
|
if not self.__ignoreEmits and Type.isCallable(self.beforeEmit) then
|
||||||
self.__ignoreEmits = true
|
self.__ignoreEmits = true
|
||||||
self:beforeEmit(functionName, listeners, ...)
|
local preventDefaults = self:beforeEmit(functionName, listeners, ...)
|
||||||
self.__ignoreEmits = false
|
self.__ignoreEmits = false
|
||||||
|
if preventDefaults then return end
|
||||||
end
|
end
|
||||||
|
|
||||||
if listeners then
|
if listeners then
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue