mirror of
https://github.com/centau/vide.git
synced 2026-08-20 14:41:37 +00:00
Add check for destruction of active scope
This commit is contained in:
parent
a1552402cb
commit
0897821e1f
3 changed files with 62 additions and 2 deletions
|
|
@ -108,6 +108,10 @@ local function unparent<T>(node: Node<T>)
|
|||
end
|
||||
|
||||
local function destroy<T>(node: Node<T>)
|
||||
if flags.strict and table.find(scopes, node) then
|
||||
throw("attempt to destroy an active scope")
|
||||
end
|
||||
|
||||
flush_cleanups(node)
|
||||
unparent(node)
|
||||
|
||||
|
|
@ -296,5 +300,7 @@ return table.freeze {
|
|||
flush_update_queue = flush_update_queue,
|
||||
get_update_queue_length = get_update_queue_length,
|
||||
set_context = set_context,
|
||||
scopes = scopes
|
||||
scopes = scopes,
|
||||
|
||||
q = update_queue
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue