mirror of
https://github.com/rojo-rbx/rojo.git
synced 2026-10-20 17:41:37 +00:00
Defensively insert existing instances into RouteMap
This commit is contained in:
parent
0d49a2e0af
commit
1b82044d7d
1 changed files with 9 additions and 0 deletions
|
|
@ -190,6 +190,12 @@ function Reconciler:reconcile(rbx, item)
|
|||
return self:_reify(item)
|
||||
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)
|
||||
self:_reconcileChildren(rbx, item)
|
||||
|
||||
|
|
@ -235,6 +241,9 @@ function Reconciler:reconcileRoute(route, item, itemRoute)
|
|||
rbx = self:reconcile(rbx, item)
|
||||
|
||||
reparent(rbx, parent)
|
||||
|
||||
print("Post reconcileRoute RouteMap:")
|
||||
print(self._routeMap:visualize())
|
||||
end
|
||||
|
||||
return Reconciler
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue