зеркало из https://github.com/mozilla/gecko-dev.git
Bug 562848: Lightweight themes without descriptions display undefined for text. r=dtownsend
This commit is contained in:
Родитель
253ae29fe0
Коммит
8ebdf6fb67
|
@ -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]);
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче