mirror of
https://github.com/rojo-rbx/rojo.git
synced 2026-04-25 23:26:19 +00:00
Fix error when targeting invalid services
This commit is contained in:
@@ -1,7 +1,7 @@
|
|||||||
# Rojo Change Log
|
# Rojo Change Log
|
||||||
|
|
||||||
## Current master
|
## Current master
|
||||||
* *No changes*
|
* Fixed obscure error when syncing into an invalid service
|
||||||
|
|
||||||
## 0.4.9 (May 26, 2018)
|
## 0.4.9 (May 26, 2018)
|
||||||
* Fixed warning when renaming or removing files that would sometimes corrupt the instance cache ([#72](https://github.com/LPGhatguy/rojo/pull/72))
|
* Fixed warning when renaming or removing files that would sometimes corrupt the instance cache ([#72](https://github.com/LPGhatguy/rojo/pull/72))
|
||||||
|
|||||||
@@ -192,12 +192,17 @@ function Reconciler:reconcileRoute(route, item, itemRoute)
|
|||||||
|
|
||||||
-- We should get services instead of making folders here.
|
-- We should get services instead of making folders here.
|
||||||
if rbx == game and not child then
|
if rbx == game and not child then
|
||||||
local _
|
local success
|
||||||
_, child = pcall(game.GetService, game, piece)
|
success, child = pcall(game.GetService, game, piece)
|
||||||
|
|
||||||
|
-- That isn't a valid service!
|
||||||
|
if not success then
|
||||||
|
child = nil
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
-- We don't want to create a folder if we're reaching our target item!
|
-- We don't want to create a folder if we're reaching our target item!
|
||||||
if not child and i ~= #route then
|
if child == nil and i ~= #route then
|
||||||
child = Instance.new("Folder")
|
child = Instance.new("Folder")
|
||||||
child.Parent = rbx
|
child.Parent = rbx
|
||||||
child.Name = piece
|
child.Name = piece
|
||||||
@@ -208,7 +213,7 @@ function Reconciler:reconcileRoute(route, item, itemRoute)
|
|||||||
end
|
end
|
||||||
|
|
||||||
-- Let's check the route map!
|
-- Let's check the route map!
|
||||||
if not rbx then
|
if rbx == nil then
|
||||||
rbx = self._routeMap:get(itemRoute)
|
rbx = self._routeMap:get(itemRoute)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user