Bug 480271 - On first sign in, username is initialized with "undefined". r=thunder
authorEdward Lee <edward.lee@engineering.uiuc.edu>
Thu, 26 Feb 2009 00:47:30 -0800
changeset 45298 ddcbab9f793eb023b9f88cd30c2602ad2d3d8436
parent 45297 a591c50facf0199862e16a25f3413376296d8e44
child 45299 da99923082c1b0f13e97e4776446999289cefdd7
push idunknown
push userunknown
push dateunknown
reviewersthunder
bugs480271
Bug 480271 - On first sign in, username is initialized with "undefined". r=thunder
services/sync/modules/service.js
--- a/services/sync/modules/service.js
+++ b/services/sync/modules/service.js
@@ -145,17 +145,17 @@ WeaveSvc.prototype = {
 
   // object for caching public and private keys
   _keyPair: {},
 
   // Timer object for automagically syncing
   _scheduleTimer: null,
 
   get username() {
-    return Svc.Prefs.get("username");
+    return Svc.Prefs.get("username", "");
   },
   set username(value) {
     if (value)
       Svc.Prefs.set("username", value);
     else
       Svc.Prefs.reset("username");
 
     // fixme - need to loop over all Identity objects - needs some rethinking...