Skip to content

Commit

Permalink
Try to rescue if fetching sync storage failed in init.
Browse files Browse the repository at this point in the history
  • Loading branch information
FelisCatus committed Mar 25, 2017
1 parent f68c54f commit 0a7f4fc
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion omega-target/src/options.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ class Options
@_state.get({'syncOptions': ''}).then ({syncOptions}) =>
return if syncOptions == 'conflict'
# Try to fetch options from sync storage.
return @sync.storage.get(null).then (options) =>
return @sync.storage.get(null).then((options) =>
if not options['schemaVersion']
@_state.set({'syncOptions': 'pristine'})
return null
Expand All @@ -135,6 +135,7 @@ class Options
@sync.enabled = true
@log.log('Options#loadOptions::fromSync', options)
options
).catch(-> null)
else
@log.error(e.stack)
# Some serious error happened when loading options. Disable syncing
Expand Down

0 comments on commit 0a7f4fc

Please sign in to comment.