summaryrefslogtreecommitdiffstats
path: root/archiva-modules/archiva-web
diff options
context:
space:
mode:
authorOlivier Lamy <olamy@apache.org>2012-07-10 18:55:18 +0000
committerOlivier Lamy <olamy@apache.org>2012-07-10 18:55:18 +0000
commit05149a2b15830be318a1a65a15d11500b456c0cb (patch)
tree8d2825f92b655c52661ae35a47903e8f08487b56 /archiva-modules/archiva-web
parentf7f824b1b25823dc8041312b1b3d356b40968aa1 (diff)
downloadarchiva-05149a2b15830be318a1a65a15d11500b456c0cb.tar.gz
archiva-05149a2b15830be318a1a65a15d11500b456c0cb.zip
no need to continue the loop when we have found the enries and prevent NPE
git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1359838 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'archiva-modules/archiva-web')
-rw-r--r--archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/main.js1
-rw-r--r--archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/search.js7
2 files changed, 7 insertions, 1 deletions
diff --git a/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/main.js b/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/main.js
index 1d4bb9d8e..639edc1e2 100644
--- a/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/main.js
+++ b/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/main.js
@@ -269,6 +269,7 @@ function() {
ko.utils.arrayFirst(self.artifactMenuItems.concat(self.usersMenuItems, self.administrationMenuItems), function(p) {
if ( p.href == "#"+self.activeMenuId()) {
p.func();
+ return;
}
});
diff --git a/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/search.js b/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/search.js
index bbc4ba4e0..98299440a 100644
--- a/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/search.js
+++ b/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/search.js
@@ -43,7 +43,9 @@ define("archiva.search",["jquery","i18n","jquery.tmpl","choosen","knockout","kno
breadCrumbEntries=function(){
// root level ?
- if (!self.parentBrowseViewModel) return [];
+ if (!self.parentBrowseViewModel){
+ return [];
+ }
return calculateBreadCrumbEntries(self.groupId);
}
@@ -69,6 +71,9 @@ define("archiva.search",["jquery","i18n","jquery.tmpl","choosen","knockout","kno
}
calculateBreadCrumbEntries=function(groupId){
+ if (!groupId){
+ return [];
+ }
var splitted = groupId.split(".");
var breadCrumbEntries=[];
var curGroupId="";