mirror of
https://github.com/rojo-rbx/rojo.git
synced 2026-10-23 22:11:38 +00:00
Refactor PatchTree and applyPatch for improved readability and logic consistency
- Restructured property change checks in PatchTree.build to enhance clarity and maintainability. - Updated applyPatch to improve the handling of instance retrieval logic for removed instances. - Simplified the findDuplicateNames function in diff.lua for better readability and consistency in handling duplicate names.
This commit is contained in:
parent
d21331cb65
commit
cd05690d8a
3 changed files with 38 additions and 36 deletions
|
|
@ -29,7 +29,9 @@ local function applyPatch(instanceMap, patch)
|
|||
|
||||
for _, removedIdOrInstance in ipairs(patch.removed) do
|
||||
-- Skip auto-created instances that shouldn't be synced
|
||||
local instance = if Types.RbxId(removedIdOrInstance) then instanceMap.fromIds[removedIdOrInstance] else removedIdOrInstance
|
||||
local instance = if Types.RbxId(removedIdOrInstance)
|
||||
then instanceMap.fromIds[removedIdOrInstance]
|
||||
else removedIdOrInstance
|
||||
if instance and Config.ignoredClassNames[instance.ClassName] then
|
||||
continue
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue