mirror of
https://github.com/rojo-rbx/rojo.git
synced 2026-10-20 17:41:37 +00:00
Clean up error handling in plugin
This commit is contained in:
parent
b1ddfc3a49
commit
87f6410877
1 changed files with 8 additions and 8 deletions
|
|
@ -22,19 +22,19 @@ function Session.new(config)
|
|||
api:connect()
|
||||
:andThen(function()
|
||||
if self.disconnected then
|
||||
return Promise.resolve()
|
||||
return
|
||||
end
|
||||
|
||||
return api:read({api.rootInstanceId})
|
||||
end)
|
||||
:andThen(function(response)
|
||||
if self.disconnected then
|
||||
return Promise.resolve()
|
||||
return
|
||||
end
|
||||
|
||||
self.reconciler:reconcile(response.instances, api.rootInstanceId, game)
|
||||
return self:__processMessages()
|
||||
end)
|
||||
end)
|
||||
:catch(function(message)
|
||||
self.disconnected = true
|
||||
self.onError(message)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue