Skip to content

Commit

Permalink
Add a check to getProperty for unknown properties. (#493)
Browse files Browse the repository at this point in the history
  • Loading branch information
GlowingUmbreon authored Oct 28, 2021
1 parent 75542da commit e136529
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions plugin/src/Reconciler/getProperty.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit e136529

Please sign in to comment.