Skip to content

Commit

Permalink
#65: fix showOffWhenDisconnected logic
Browse files Browse the repository at this point in the history
  • Loading branch information
Paul Schroeder authored and Paul Schroeder committed Jan 16, 2024
1 parent cab7ede commit 8a33150
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions src/api/VeSync.ts
Original file line number Diff line number Diff line change
Expand Up @@ -173,13 +173,13 @@ export default class VeSync {
this.log.error(
'VeSync cannot communicate with humidifier! Check the VeSync App.',
);
}
if (this.config.options.showOffWhenDisconnected) {
return false;
} else {
throw new Error(
'Device was unreachable. Ensure it is plugged in and connected to WiFi.',
);
if (this.config.options.showOffWhenDisconnected) {
return false;
} else {
throw new Error(
'Device was unreachable. Ensure it is plugged in and connected to WiFi.',
);
}
}

if (!response?.data) {
Expand Down

0 comments on commit 8a33150

Please sign in to comment.