mirror of
https://github.com/centau/vide.git
synced 2026-08-20 14:41:37 +00:00
Ignore false passed as a child
This commit is contained in:
parent
c796e48173
commit
46a2043356
3 changed files with 16 additions and 1 deletions
|
|
@ -18,6 +18,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
|
||||||
impulse.
|
impulse.
|
||||||
- `show()` now receives a source to its callback returning the current value
|
- `show()` now receives a source to its callback returning the current value
|
||||||
of the condition.
|
of the condition.
|
||||||
|
- Ignore `false` passed as a child.
|
||||||
|
|
||||||
### Changed
|
### Changed
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -93,7 +93,7 @@ local function process_properties(properties: Map<unknown, unknown>, instance: I
|
||||||
else
|
else
|
||||||
process_properties(value :: Map<unknown, unknown>, instance, cache, depth + 1)
|
process_properties(value :: Map<unknown, unknown>, instance, cache, depth + 1)
|
||||||
end
|
end
|
||||||
else
|
elseif type(value) == "userdata" then
|
||||||
(value :: Instance).Parent = instance -- parent child
|
(value :: Instance).Parent = instance -- parent child
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
||||||
|
|
@ -819,6 +819,20 @@ TEST("create()", wrap_root(function()
|
||||||
CHECK(frame:FindFirstChild "G")
|
CHECK(frame:FindFirstChild "G")
|
||||||
end
|
end
|
||||||
|
|
||||||
|
do CASE "set false as child"
|
||||||
|
create "Frame" {
|
||||||
|
false
|
||||||
|
}
|
||||||
|
|
||||||
|
create "Frame" {
|
||||||
|
function() return false end
|
||||||
|
}
|
||||||
|
|
||||||
|
create "Frame" {
|
||||||
|
function() return { false } end
|
||||||
|
}
|
||||||
|
end
|
||||||
|
|
||||||
do CASE "binding properties to source"
|
do CASE "binding properties to source"
|
||||||
local name = source("Hi")
|
local name = source("Hi")
|
||||||
local text = source("Bye")
|
local text = source("Bye")
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue