Fixed usage of shallowCopy for entity:getComponents

This commit is contained in:
Brandon Blanker Lim-it 2021-08-29 12:32:37 +08:00 committed by GitHub
parent d6bd0de564
commit ef6ef69316
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -189,7 +189,7 @@ end
-- Use Entity:give/ensure/remove instead
-- @treturn table Table of all Components the Entity has
function Entity:getComponents()
local components = Utils.shallowCopy(self)
local components = Utils.shallowCopy(self, {})
components.__world = nil
components.__isEntity = nil