mirror of
https://github.com/rojo-rbx/rojo.git
synced 2026-10-20 17:41:37 +00:00
Add a check to getProperty for unknown properties. (#493)
This commit is contained in:
parent
75542dacb3
commit
e136529ff0
1 changed files with 7 additions and 0 deletions
|
|
@ -40,6 +40,13 @@ local function getProperty(instance, propertyName)
|
|||
})
|
||||
end
|
||||
|
||||
if err.kind == RbxDom.Error.Kind.Roblox and err.extra:find("is not a valid member of") then
|
||||
return false, Error.new(Error.UnknownProperty, {
|
||||
className = instance.ClassName,
|
||||
propertyName = propertyName,
|
||||
})
|
||||
end
|
||||
|
||||
return false, Error.new(Error.OtherPropertyError, {
|
||||
className = instance.ClassName,
|
||||
propertyName = propertyName,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue