Set an empty array if there are no robots on the account

This commit is contained in:
Greg Hulands 2018-03-24 22:54:12 -07:00
parent 9e9dd80547
commit 7fef07df0a

View File

@ -65,6 +65,7 @@ NeatoVacuumRobotPlatform.prototype = {
else { else {
if (robots.length === 0) { if (robots.length === 0) {
that.log.error("Successful login but no robots associated with your account."); that.log.error("Successful login but no robots associated with your account.");
that.robots = [];
callback(); callback();
} }
else { else {