mirror of
https://github.com/Keyslam-Group/Concord.git
synced 2025-09-02 12:24:11 -04:00
Fix for Entity:has not returning false if the component doesn't exist
The documentation states that Entity:has will return false if the component doesn't exist and true if it does. However, the previous behaviour was to return nil if the component doesn't exist.
This commit is contained in:
parent
a50e3caf8b
commit
54af717df8
1 changed files with 1 additions and 1 deletions
|
@ -71,7 +71,7 @@ end
|
|||
-- @params component The Component to check against
|
||||
-- @return True if the entity has the Bag. False otherwise
|
||||
function Entity:has(component)
|
||||
return self.components[component] and true
|
||||
return self.components[component] ~= nil
|
||||
end
|
||||
|
||||
return setmetatable(Entity, {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue