git://git.onelab.eu
/
unfold.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f7750e0
)
Bug fix: if no local storage, this.user = false
author
Loic Baron
<loic.baron@lip6.fr>
Tue, 20 May 2014 08:51:38 +0000
(10:51 +0200)
committer
Loic Baron
<loic.baron@lip6.fr>
Tue, 20 May 2014 08:51:38 +0000
(10:51 +0200)
portal/static/js/myslice.js
patch
|
blob
|
history
diff --git
a/portal/static/js/myslice.js
b/portal/static/js/myslice.js
index
2f86655
..
d9593af
100644
(file)
--- 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;
},