Skip to content

Commit e92bf56

Browse files
committed
Check that payload is fully inited
1 parent e13302e commit e92bf56

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
@@ -576,7 +576,7 @@ class TuyaDevice extends EventEmitter {
576576
return;
577577
}
578578

579-
if (packet.commandByte === CommandType.STATUS && packet.payload && typeof packet.payload.dps[1] === 'undefined') {
579+
if (packet.commandByte === CommandType.STATUS && packet.payload && packet.payload.dps && typeof packet.payload.dps[1] === 'undefined') {
580580
debug('Received DP_REFRESH packet.');
581581
/**
582582
* Emitted when dp_refresh data is proactive returned from device, omitting dps 1

0 commit comments

Comments
 (0)