Skip to content

Commit

Permalink
Log configure error. Koenkk#768
Browse files Browse the repository at this point in the history
  • Loading branch information
Koenkk committed Jan 6, 2019
1 parent 40d298f commit 308b437
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions devices.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ const foundationCfg = {manufSpec: 0, disDefaultRsp: 0};

const execute = (device, actions, callback, delay) => {
if (!device) {
callback(false);
callback(false, 'No device');
return;
}
delay || (delay = 300);
Expand All @@ -43,7 +43,7 @@ const execute = (device, actions, callback, delay) => {

const next = () => {
if (nextActionIndex === len) {
callback(true);
callback(true, '');
return;
}

Expand All @@ -54,7 +54,7 @@ const execute = (device, actions, callback, delay) => {
(error) => {
debug(`Configured '${nextAction.toString()}' with result '${error ? error : 'OK'}'`);
if (error) {
callback(false);
callback(false, error);
return;
}
next();
Expand Down

0 comments on commit 308b437

Please sign in to comment.