var pkg = pkgInfo[node.text];
- if (!_.isEmpty(pkg.name)) {
- text.html(pkg.name);
- }
- if (!_.isEmpty(pkg.version)) {
- if (!_.isEmpty(pkg.version.rel)) {
- version.html(pkg.version.ver + '-' + pkg.version.rel);
- } else {
- version.html(pkg.version.ver);
+ if (!_.isEmpty(pkg)) {
+ if (!_.isEmpty(pkg.name)) {
+ text.html(pkg.name);
+ }
+ if (!_.isEmpty(pkg.version)) {
+ if (!_.isEmpty(pkg.version.rel)) {
+ version.html(pkg.version.ver + '-' + pkg.version.rel);
+ } else {
+ version.html(pkg.version.ver);
+ }
+ }
+ if (!_.isEmpty(pkg.arch)) {
+ arch.html(pkg.arch);
+ }
+ if (!_.isEmpty(pkg.size)) {
+ size.html(Util.bytesToSize(pkg.size));
+ }
+ if (!_.isEmpty(pkg.installed)) {
+ installedSize.html(Util.bytesToSize(pkg.installed));
+ }
+ if (!_.isEmpty(pkg.summary)) {
+ summary.html(pkg.summary);
+ }
+ if (!_.isEmpty(pkg.description)) {
+ description.html(pkg.description);
+ }
+ } else {
+ // 'MISC' case
+ if (!_.isEmpty(node.text)) {
+ text.html(node.text);
}
- }
- if (!_.isEmpty(pkg.arch)) {
- arch.html(pkg.arch);
- }
- if (!_.isEmpty(pkg.size)) {
- size.html(Util.bytesToSize(pkg.size));
- }
- if (!_.isEmpty(pkg.installed)) {
- installedSize.html(Util.bytesToSize(pkg.installed));
- }
- if (!_.isEmpty(pkg.summary)) {
- summary.html(pkg.summary);
- }
- if (!_.isEmpty(pkg.description)) {
- description.html(pkg.description);
}
}