dt-common-device 8.0.4 → 8.0.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -215,7 +215,7 @@ let LocalDeviceService = (() => {
215
215
  }
216
216
  // If old state and new state are different
217
217
  const oldState = (await this.getState(deviceId))?.state ?? {};
218
- const changedKeys = Object.keys(newState).filter((key) => !(0, lodash_1.isEqual)(oldState[key].value.toLowerCase(), newState[key].value.toLowerCase()));
218
+ const changedKeys = Object.keys(newState).filter((key) => !(0, lodash_1.isEqual)(oldState[key]?.value?.toLowerCase(), newState[key]?.value?.toLowerCase()));
219
219
  if (changedKeys.length > 0) {
220
220
  await this.deviceRepository.setState(deviceId, newState);
221
221
  return await this.eventHandler.onStateChange(deviceId, newState, auditProperties, eventType);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dt-common-device",
3
- "version": "8.0.4",
3
+ "version": "8.0.5",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "files": [