Skip to content

Commit

Permalink
fix: "NaN" for events-state-changed
Browse files Browse the repository at this point in the history
  • Loading branch information
zaneclaes authored Apr 2, 2020
1 parent c693043 commit 5aa5b71
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion nodes/events-state-changed/events-state-changed.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ module.exports = function (RED) {
if (this.isEnabled === false) {
return;
}
const { entity_id, event } = { ...evt };
const { entity_id, event } = JSON.parse(JSON.stringify(evt));

if (!event.new_state) {
return null;
Expand Down

0 comments on commit 5aa5b71

Please sign in to comment.