diff --git a/toolkit/mozapps/extensions/LightweightThemeManager.jsm b/toolkit/mozapps/extensions/LightweightThemeManager.jsm index 7ff1cc00281..799d1b368c0 100644 --- a/toolkit/mozapps/extensions/LightweightThemeManager.jsm +++ b/toolkit/mozapps/extensions/LightweightThemeManager.jsm @@ -394,9 +394,17 @@ function AddonWrapper(aTheme, aBeingEnabled) { return false; }); - ["name", "version", "description", "homepageURL", "iconURL"].forEach(function(prop) { - this.__defineGetter__(prop, function() aTheme[prop]); + this.__defineGetter__("name", function() aTheme.name); + this.__defineGetter__("version", function() { + return "version" in aTheme ? aTheme.version : ""; + }); + + ["description", "homepageURL", "iconURL"].forEach(function(prop) { + this.__defineGetter__(prop, function() { + return prop in aTheme ? aTheme[prop] : null; + }); }, this); + this.__defineGetter__("creator", function() aTheme.author); this.__defineGetter__("screenshots", function() [aTheme.previewURL]);