Bug 802063 - [Settings] Won't remember the Data Connection status after reboot. r=gwagner
authorVivien Nicolas <21@vingtetun.org>
Thu, 25 Oct 2012 15:02:15 +0200
changeset 111512 d208c273a705f805fdc18335f9de65b8657be2f2
parent 111511 f6293f153a6b78241b4a4494beb616ed173e5dcc
child 111513 1d9e4246b040b418a0578bd1648b0cbc7edce2b3
push id93
push usernmatsakis@mozilla.com
push dateWed, 31 Oct 2012 21:26:57 +0000
reviewersgwagner
bugs802063
milestone19.0a1
Bug 802063 - [Settings] Won't remember the Data Connection status after reboot. r=gwagner
dom/settings/SettingsManager.js
--- a/dom/settings/SettingsManager.js
+++ b/dom/settings/SettingsManager.js
@@ -104,17 +104,17 @@ SettingsLock.prototype = {
 
             for (var i in event.target.result) {
               let result = event.target.result[i];
               var name = result.settingName;
               var value = result.settingValue;
               results[name] = value;
               results.__exposedProps__[name] = "r";
               // If the value itself is an object, expose the properties.
-              if (typeof value == "object") {
+              if (typeof value == "object" && value != null) {
                 var exposed = {};
                 Object.keys(value).forEach(function(key) { exposed[key] = 'r'; });
                 results[name].__exposedProps__ = exposed;
               }
             }
 
             this._open = true;
             Services.DOMRequest.fireSuccess(request, results);