prevent js npe

git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1346613 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Olivier Lamy 2012-06-05 21:44:13 +00:00
parent 0af5a819d9
commit f31f365535
2 changed files with 17 additions and 11 deletions

View File

@ -895,7 +895,7 @@ define("search",["jquery","i18n","jquery.tmpl","choosen","order!knockout","knock
}
return projectVersionMetadata;
}
return null;
return new ProjectVersionMetadata();
}
MavenFacet=function(packaging,parent){

View File

@ -468,8 +468,13 @@
</tr>
<tr>
<th>${$.i18n.prop('browse.artifact.packaging')}</th>
{{if projectVersionMetadata.mavenFacet}}
<td>${projectVersionMetadata.mavenFacet.packaging}</td>
{{else}}
<td></td>
{{/if}}
</tr>
{{if projectVersionMetadata.mavenFacet}}
{{if projectVersionMetadata.mavenFacet.parent }}
<tr>
<th>${$.i18n.prop('browse.artifact.parent')}</th>
@ -480,6 +485,7 @@
</td>
</tr>
{{/if}}
{{/if}}
</tbody>
</table>
</div>