mirror of
https://github.com/rojo-rbx/rojo.git
synced 2026-04-26 15:46:28 +00:00
Defensively insert existing instances into RouteMap
This commit is contained in:
@@ -190,6 +190,12 @@ function Reconciler:reconcile(rbx, item)
|
|||||||
return self:_reify(item)
|
return self:_reify(item)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
-- It's possible that the instance we're associating with this item hasn't
|
||||||
|
-- been inserted into the RouteMap yet.
|
||||||
|
if item.Route ~= nil then
|
||||||
|
self._routeMap:insert(item.Route, rbx)
|
||||||
|
end
|
||||||
|
|
||||||
applyProperties(rbx, item.Properties)
|
applyProperties(rbx, item.Properties)
|
||||||
self:_reconcileChildren(rbx, item)
|
self:_reconcileChildren(rbx, item)
|
||||||
|
|
||||||
@@ -235,6 +241,9 @@ function Reconciler:reconcileRoute(route, item, itemRoute)
|
|||||||
rbx = self:reconcile(rbx, item)
|
rbx = self:reconcile(rbx, item)
|
||||||
|
|
||||||
reparent(rbx, parent)
|
reparent(rbx, parent)
|
||||||
|
|
||||||
|
print("Post reconcileRoute RouteMap:")
|
||||||
|
print(self._routeMap:visualize())
|
||||||
end
|
end
|
||||||
|
|
||||||
return Reconciler
|
return Reconciler
|
||||||
|
|||||||
Reference in New Issue
Block a user