diff --git a/luciexpress/htdocs/js/rpc.js b/luciexpress/htdocs/js/rpc.js index e1004bbb1..713f810af 100644 --- a/luciexpress/htdocs/js/rpc.js +++ b/luciexpress/htdocs/js/rpc.js @@ -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 {