Bug 562848: Lightweight themes without descriptions display undefined for text. r=dtownsend

This commit is contained in:
Robert Strong 2010-05-05 15:02:45 -07:00
Родитель 85f4d1448c
Коммит b4d5a90ea9
1 изменённых файлов: 10 добавлений и 2 удалений

Просмотреть файл

@ -394,9 +394,17 @@ function AddonWrapper(aTheme, aBeingEnabled) {
return false; return false;
}); });
["name", "version", "description", "homepageURL", "iconURL"].forEach(function(prop) { this.__defineGetter__("name", function() aTheme.name);
this.__defineGetter__(prop, function() aTheme[prop]); 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);
this.__defineGetter__("creator", function() aTheme.author); this.__defineGetter__("creator", function() aTheme.author);
this.__defineGetter__("screenshots", function() [aTheme.previewURL]); this.__defineGetter__("screenshots", function() [aTheme.previewURL]);