mirror of
https://github.com/centau/vide.git
synced 2026-08-20 14:41:37 +00:00
Allow vide.branch to be used in a reactive scope
This commit is contained in:
parent
3faa1ed701
commit
7deae9c9f6
2 changed files with 10 additions and 2 deletions
|
|
@ -13,8 +13,8 @@ local function branch<T>(fn: () -> T): (() -> (), T)
|
|||
end
|
||||
|
||||
local parent = current.owner
|
||||
if not parent or parent.effect then
|
||||
error(`current scope is not owned by a stable scope`, 0)
|
||||
if not parent then
|
||||
error(`current scope is not owned by a scope`, 0)
|
||||
end
|
||||
|
||||
local node = create_node(parent, false, false)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue