Fixes undefined user error

aka fixing sloppy code...
This commit is contained in:
Roel Walraven 2016-08-04 16:57:15 +02:00
parent 249777f9f7
commit 8eb53aff09

View File

@ -139,8 +139,8 @@ LightDMMock.prototype.authenticate = function(username) {
var exists = false;
for(var i = 0; i <= this.users.length; i++) {
if(this.users.name === username)
for(var i = 0; i <= this.users.length -1; i++) {
if(this.users[i].name === username)
exists = true;
}