forked from rojo-rbx/rojo
Make reconciler more robust with regards to RouteMap
This commit is contained in:
@@ -143,6 +143,7 @@ function Reconciler:reconcile(rbx, item)
|
|||||||
-- Item was deleted
|
-- Item was deleted
|
||||||
if not item then
|
if not item then
|
||||||
if rbx then
|
if rbx then
|
||||||
|
self._routeMap:removeByRbx(rbx)
|
||||||
rbx:Destroy()
|
rbx:Destroy()
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -156,9 +157,10 @@ function Reconciler:reconcile(rbx, item)
|
|||||||
|
|
||||||
-- Item changed type!
|
-- Item changed type!
|
||||||
if not classEqual(rbx, item.ClassName) then
|
if not classEqual(rbx, item.ClassName) then
|
||||||
|
self._routeMap:removeByRbx(rbx)
|
||||||
rbx:Destroy()
|
rbx:Destroy()
|
||||||
|
|
||||||
rbx = self:_reify(item)
|
return self:_reify(item)
|
||||||
end
|
end
|
||||||
|
|
||||||
-- Apply all properties, Roblox will de-duplicate changes
|
-- Apply all properties, Roblox will de-duplicate changes
|
||||||
|
|||||||
Reference in New Issue
Block a user