Skip to content

Commit

Permalink
Fix redundant checks in world_remove
Browse files Browse the repository at this point in the history
  • Loading branch information
lolmanurfunny committed Feb 21, 2025
1 parent 3815c62 commit b53ecba
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion jecs.luau
Original file line number Diff line number Diff line change
Expand Up @@ -899,7 +899,7 @@ local function world_remove(world: World, entity: i53, id: i53)
end
local to = archetype_traverse_remove(world, id, from)

if from and not (from == to) then
if from ~= to then
local idr = world.component_index[id]
local on_remove = idr.hooks.on_remove
if on_remove then
Expand Down

0 comments on commit b53ecba

Please sign in to comment.