From 7f995e964d29fd29778f35762e7d19065c0497dd Mon Sep 17 00:00:00 2001 From: Koen Kanters Date: Mon, 14 Jun 2021 19:12:24 +0200 Subject: [PATCH] Fix "Cannot read property 'group' of null" exception on "request/group/members/remove_all". https://github.com/Koenkk/zigbee2mqtt/issues/7785 --- lib/extension/bind.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/lib/extension/bind.js b/lib/extension/bind.js index 59b4736ab..fa1870deb 100755 --- a/lib/extension/bind.js +++ b/lib/extension/bind.js @@ -277,10 +277,9 @@ class Bind extends Extension { } async groupMembersChanged(data) { - const bindsToGroup = this.zigbee.getClients().map((c) => c.endpoints).flat().map((e) => e.binds) - .flat().filter((b) => b.target === data.group.group); - if (data.action === 'add') { + const bindsToGroup = this.zigbee.getClients().map((c) => c.endpoints).flat().map((e) => e.binds) + .flat().filter((b) => b.target === data.group.group); await this.setupReporting(bindsToGroup); } else { // action === remove/remove_all if (!data.skipDisableReporting) {