diff --git a/archiva-modules/archiva-web/archiva-webapp/src/main/webapp/js/archiva/main.js b/archiva-modules/archiva-web/archiva-webapp/src/main/webapp/js/archiva/main.js index 87d8272c1..1de6e592b 100644 --- a/archiva-modules/archiva-web/archiva-webapp/src/main/webapp/js/archiva/main.js +++ b/archiva-modules/archiva-web/archiva-webapp/src/main/webapp/js/archiva/main.js @@ -66,6 +66,9 @@ function(jquery,ui,sammy,tmpl,i18n,jqueryCookie,bootstrap,archivaSearch,jqueryVa getUserFromLoginCookie=function(){ var cookieContent=$.cookie('archiva_login'); $.log("archiva_getUserFromLoginCookie cookie content:"+cookieContent); + if (!cookieContent) { + return null; + } var user = $.parseJSON(cookieContent); if(!user){ return null;