X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;ds=sidebyside;f=portal%2Fstatic%2Fjs%2Fmyslice.js;h=d9593af78651c3ff2ca3d05dee5a6fc336907dfa;hb=9c22e578ac9d3e3d544fe87191790915620bef26;hp=2f8665534b011042d5cc737e524ba45fe6be16ef;hpb=f7750e08d78ebb75b222baf901853370cd7ffff5;p=unfold.git diff --git a/portal/static/js/myslice.js b/portal/static/js/myslice.js index 2f866553..d9593af7 100644 --- a/portal/static/js/myslice.js +++ b/portal/static/js/myslice.js @@ -106,7 +106,11 @@ var myslice = { user: function() { if ($.isEmptyObject(this.user)) { //this.login(function() { return this.user; }); - this.user = JSON.parse(localStorage.getItem('user')); + if(localStorage.getItem('user')!='undefined'){ + this.user = JSON.parse(localStorage.getItem('user')); + }else{ + return false; + } } return this.user; },