소스 검색

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)