瀏覽代碼

Try to rescue if fetching sync storage failed in init.

FelisCatus 8 年之前
父節點
當前提交
0a7f4fcdaf
共有 1 個文件被更改,包括 2 次插入1 次删除
  1. 2 1
      omega-target/src/options.coffee

+ 2 - 1
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