Fix crash when there is no state yet.

This commit is contained in:
Koen Kanters
2019-04-30 19:30:26 +02:00
parent a54e256b40
commit 39fe50600e
+1 -1
View File
@@ -72,7 +72,7 @@ class Groups {
const payload = {};
properties.forEach((prop) => {
if (to.hasOwnProperty(prop) && from[prop] != to[prop]) {
if (to.hasOwnProperty(prop) && (!from || from[prop] != to[prop])) {
payload[prop] = to[prop];
}
});