Skip to content

Commit 4add385

Browse files
author
RoFlection Bot
committed
Port queries/display-value, element-queries tests (#50)
* port queries/display-value * port element-queries tests
1 parent 1f08873 commit 4add385

13 files changed

+1812
-98
lines changed

jsHelpers/querySelectors.lua

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,10 @@ local function matches(instance: Instance, patterns: Array<string>, type_: PropO
1414
return instance.ClassName:find(pattern) ~= nil
1515
elseif type_ == "property" then
1616
-- ROBLOX FIXME Luau: will complain when accessing with an indexed property
17-
return (instance :: any)[pattern] ~= nil
17+
local _, res = pcall(function()
18+
return (instance :: any)[pattern]
19+
end)
20+
return res ~= nil
1821
else
1922
return instance:GetAttribute(pattern) ~= nil
2023
end

0 commit comments

Comments
 (0)