瀏覽代碼

Fix showExternalProfile default settings. Fix #1554.

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

+ 6 - 5
omega-target/src/options.coffee

@@ -368,11 +368,12 @@ class Options
       if refresh?
         @_state.set({'refreshOnProfileChange': refresh})
 
-      showExternal = changes['-showExternalProfile']
-      if not showExternal?
-        showExternal = true
-        @_setOptions({'-showExternalProfile': true}, {persist: true})
-      @_state.set({'showExternalProfile': showExternal})
+      if Object::hasOwnProperty.call changes, '-showExternalProfile'
+        showExternal = changes['-showExternalProfile']
+        if not showExternal?
+          showExternal = true
+          @_setOptions({'-showExternalProfile': true}, {persist: true})
+        @_state.set({'showExternalProfile': showExternal})
 
       quickSwitchProfiles = changes['-quickSwitchProfiles']
       quickSwitchProfiles = @_cleanUpQuickSwitchProfiles(quickSwitchProfiles)