mirror of
https://github.com/1bardesign/batteries.git
synced 2024-11-25 07:04:35 +00:00
...needed to forward-declare for the previous fix
This commit is contained in:
parent
c6e6ec858c
commit
844c9e8c8f
@ -97,8 +97,9 @@ end
|
||||
|
||||
--subscribe to an event, automatically unsubscribe once called
|
||||
function pubsub:subscribe_once(event, callback)
|
||||
local f
|
||||
local called = false
|
||||
local f = function(...)
|
||||
f = function(...)
|
||||
if not called then
|
||||
callback(...)
|
||||
self:unsubscribe(event, f)
|
||||
|
Loading…
Reference in New Issue
Block a user