File tree Expand file tree Collapse file tree 4 files changed +37
-89
lines changed
Expand file tree Collapse file tree 4 files changed +37
-89
lines changed Original file line number Diff line number Diff 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} ;
Original file line number Diff line number Diff 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} ;
Original file line number Diff line number Diff 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} ;
You can’t perform that action at this time.
0 commit comments