Merge pull request #4 from josh-perry/fix_entity_has_nil

Thanks for the pull request. I will merge it.

There may be more inconsistencies like this that I will check and fix.
This commit is contained in:
Justin van der Leij 2018-03-13 17:05:40 +01:00 committed by GitHub
commit 5949b542ea
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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, {