Skip to content

Commit

Permalink
linting
Browse files Browse the repository at this point in the history
  • Loading branch information
Apollon77 committed Aug 16, 2024
1 parent 800c611 commit d3d91ed
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -411,13 +411,12 @@ class TuyaDevice extends EventEmitter {

// Queue this request and limit concurrent set requests to one
return this._setQueue.add(() => pTimeout(new Promise((resolve, reject) => {

// Make sure we only resolve or reject once
let resolvedOrRejected = false;

// Send request and wait for response
try {
if(this.device.version === '3.5') {
if (this.device.version === '3.5') {
this._currentSequenceN++;
}

Expand All @@ -432,7 +431,8 @@ class TuyaDevice extends EventEmitter {
if (!resolvedOrRejected) {
resolve();
}
}
};

this._setResolveAllowGet = options.isSetCallToGetData;
} else {
resolvedOrRejected = true;
Expand All @@ -450,8 +450,8 @@ class TuyaDevice extends EventEmitter {
this._expectRefreshResponseForSequenceN = undefined;

this.emit(
'error',
'Timeout waiting for status response from device id: ' + this.device.id
'error',
'Timeout waiting for status response from device id: ' + this.device.id
);
}));
}
Expand Down

0 comments on commit d3d91ed

Please sign in to comment.