Merge pull request #12 from ghulands/fix_no_robots

Set an empty array if there are no robots on the account
This commit is contained in:
Arne 2018-03-25 22:01:32 +02:00 committed by GitHub
commit 0de549dd41
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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 {