mirror of
https://github.com/centau/vide.git
synced 2026-08-20 14:41:37 +00:00
Merge pull request #5 from littensy/patch-1
Fix actions receiving nil instance
This commit is contained in:
commit
374593029a
1 changed files with 2 additions and 2 deletions
|
|
@ -14,7 +14,7 @@ type Node<T> = graph.Node<T>
|
|||
local event_buffer: { [string]: () -> () } = {}
|
||||
|
||||
-- buffer of priority -> callback to run after events are connected
|
||||
local action_buffers = {} :: { { () -> () } }
|
||||
local action_buffers = {} :: { { (Instance) -> () } }
|
||||
setmetatable(action_buffers :: any, {
|
||||
__index = function(_, i: number)
|
||||
action_buffers[i] = {}
|
||||
|
|
@ -131,7 +131,7 @@ local function apply<T>(instance: T & Instance, properties: { [unknown]: unknown
|
|||
-- run buffered actions respecting their priorities
|
||||
for _, buffer in next, action_buffers do
|
||||
for _, callback in next, buffer do
|
||||
callback()
|
||||
callback(instance)
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue