Browse Source

make it clearer under what circumstances we return the default value of a preference being retrieved

Myk Melez 16 years ago
parent
commit
0e9a3d58ba
1 changed files with 3 additions and 2 deletions
  1. 3 2
      Preferences.js

+ 3 - 2
Preferences.js

@@ -82,9 +82,10 @@ Preferences.prototype = {
         return this._prefSvc.getIntPref(prefName);
       case Ci.nsIPrefBranch.PREF_BOOL:
         return this._prefSvc.getBoolPref(prefName);
+      case Ci.nsIPrefBranch.PREF_INVALID:
+      default:
+        return defaultValue;
     }
-
-    return defaultValue;
   },
 
   set: function(prefName, prefValue) {