mirror of
https://github.com/rojo-rbx/rojo.git
synced 2026-04-22 05:35:10 +00:00
Fix error when targeting invalid services
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
# Rojo Change Log
|
||||
|
||||
## Current master
|
||||
* *No changes*
|
||||
* Fixed obscure error when syncing into an invalid service
|
||||
|
||||
## 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))
|
||||
|
||||
@@ -192,12 +192,17 @@ function Reconciler:reconcileRoute(route, item, itemRoute)
|
||||
|
||||
-- We should get services instead of making folders here.
|
||||
if rbx == game and not child then
|
||||
local _
|
||||
_, child = pcall(game.GetService, game, piece)
|
||||
local success
|
||||
success, child = pcall(game.GetService, game, piece)
|
||||
|
||||
-- That isn't a valid service!
|
||||
if not success then
|
||||
child = nil
|
||||
end
|
||||
end
|
||||
|
||||
-- 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.Parent = rbx
|
||||
child.Name = piece
|
||||
@@ -208,7 +213,7 @@ function Reconciler:reconcileRoute(route, item, itemRoute)
|
||||
end
|
||||
|
||||
-- Let's check the route map!
|
||||
if not rbx then
|
||||
if rbx == nil then
|
||||
rbx = self._routeMap:get(itemRoute)
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user