Bug 532577: Customizing personas will break addons manager
authorJose E. Bolanos <jose@appcoast.com>
Thu, 03 Dec 2009 14:06:29 -0600
changeset 1250 042184de73123c38c66b0bec336964d825c3078c
parent 1249 1b01c9f3ea1af7bc0242a863dc3d11c4d4e37e40
child 1255 4faa9a7e541aa9090e60f621fa5c558d58b81845
push id801
push userjose@glaxstar.com
push dateThu, 03 Dec 2009 20:06:49 +0000
bugs532577
Bug 532577: Customizing personas will break addons manager
client/content/customPersonaEditor.js
--- a/client/content/customPersonaEditor.js
+++ b/client/content/customPersonaEditor.js
@@ -138,17 +138,20 @@ let CustomPersonaEditor = {
   },
 
   _restore: function() {
     try {
       this.customPersona = JSON.parse(this._prefs.get("custom"));
       this.customPersona.custom = true;
     }
     catch(ex) {
-      this.customPersona = { custom: true };
+      this.customPersona = {
+        id: 0,
+        name: this._strings.get("customPersona"),
+        custom: true };
     }
 
     this._header.value = this.customPersona.headerURL || this.customPersona.header || "";
     this._footer.value = this.customPersona.footerURL || this.customPersona.footer || "";
     this._customName.value = this.customPersona.name || "";
     this._textColorPicker.color = this.customPersona.textcolor || "#000000";
     this._accentColorPicker.color = this.customPersona.accentcolor || "#C9C9C9";