From 0a7f4fcdafac434d170bac1c5fce2e07512187a5 Mon Sep 17 00:00:00 2001 From: FelisCatus Date: Fri, 24 Mar 2017 23:01:09 -0400 Subject: [PATCH] Try to rescue if fetching sync storage failed in init. --- omega-target/src/options.coffee | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/omega-target/src/options.coffee b/omega-target/src/options.coffee index ba29231..68168f9 100644 --- a/omega-target/src/options.coffee +++ b/omega-target/src/options.coffee @@ -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 @@ -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