Skip to content

Commit b7952bf

Browse files
committed
Fix XO errors
1 parent be35295 commit b7952bf

File tree

4 files changed

+37
-89
lines changed

4 files changed

+37
-89
lines changed

index.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -168,8 +168,8 @@ TuyaDevice.prototype.get = function (options) {
168168
} else {
169169
resolve(data.dps['1']);
170170
}
171-
}).catch(err => {
172-
reject(err);
171+
}).catch(error => {
172+
reject(error);
173173
});
174174
});
175175
};
@@ -225,8 +225,8 @@ TuyaDevice.prototype.set = function (options) {
225225
return new Promise((resolve, reject) => {
226226
this._send(this.device.ip, buffer).then(() => {
227227
resolve(true);
228-
}).catch(err => {
229-
reject(err);
228+
}).catch(error => {
229+
reject(error);
230230
});
231231
});
232232
};

lib/cipher.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ TuyaCipher.prototype.decrypt = function (data) {
6666
// otherwise return as string.
6767
try {
6868
return JSON.parse(result);
69-
} catch (err) {
69+
} catch (error) {
7070
return result;
7171
}
7272
};

lib/message-parser.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ MessageParser.prototype._decode = function () {
9898
// If error, return as string.
9999
try {
100100
return JSON.parse(this._data);
101-
} catch (err) { // Data is encrypted
101+
} catch (error) { // Data is encrypted
102102
return this._data.toString('ascii');
103103
}
104104
};

0 commit comments

Comments
 (0)