fixed username undefined issue

This commit is contained in:
Noel Wuyts 2015-05-20 10:05:39 +02:00 committed by Martin Schröder
parent ff3b827527
commit a68bfe0c35

View file

@ -82,8 +82,8 @@
self.session.access({
"keys": ""
}).done(function(result){
if(!("username" in result.data)) {
console.log("Session: Not authenticated!");
if(!("username" in (result.data||{}))) {
console.log("Session: Not authenticated!");
RPC_SESSION_ID = RPC_DEFAULT_SESSION_ID; // reset sid to 000..
deferred.reject();
} else {