Skip to content

Commit 9ad031a

Browse files
authored
Merge pull request #29 from dresende/dresende-patch-1
Fixes "TypeError: Cannot set property '3' of undefined"
2 parents 1bf8450 + e248e10 commit 9ad031a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -230,7 +230,7 @@ TuyaDevice.prototype.set = function (options) {
230230
if (options.dps === undefined) {
231231
thisRequest.dps = {1: options.set};
232232
} else {
233-
thisRequest.dps[options.dps.toString()] = options.set;
233+
thisRequest.dps = {[options.dps.toString()]: options.set};
234234
}
235235

236236
debug('Payload: ');

0 commit comments

Comments
 (0)