mirror of
https://github.com/zero-peak/ZeroOmega.git
synced 2025-02-08 13:38:14 -05:00
Try to rescue if fetching sync storage failed in init.
This commit is contained in:
parent
f68c54fbae
commit
0a7f4fcdaf
@ -126,7 +126,7 @@ class Options
|
|||||||
@_state.get({'syncOptions': ''}).then ({syncOptions}) =>
|
@_state.get({'syncOptions': ''}).then ({syncOptions}) =>
|
||||||
return if syncOptions == 'conflict'
|
return if syncOptions == 'conflict'
|
||||||
# Try to fetch options from sync storage.
|
# 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']
|
if not options['schemaVersion']
|
||||||
@_state.set({'syncOptions': 'pristine'})
|
@_state.set({'syncOptions': 'pristine'})
|
||||||
return null
|
return null
|
||||||
@ -135,6 +135,7 @@ class Options
|
|||||||
@sync.enabled = true
|
@sync.enabled = true
|
||||||
@log.log('Options#loadOptions::fromSync', options)
|
@log.log('Options#loadOptions::fromSync', options)
|
||||||
options
|
options
|
||||||
|
).catch(-> null)
|
||||||
else
|
else
|
||||||
@log.error(e.stack)
|
@log.error(e.stack)
|
||||||
# Some serious error happened when loading options. Disable syncing
|
# Some serious error happened when loading options. Disable syncing
|
||||||
|
Loading…
Reference in New Issue
Block a user