Skip to content

Commit 6d4de05

Browse files
committed
Update event.js
1 parent 0398e2a commit 6d4de05

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/models/event.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,13 @@ class Event {
8080
this.payload[prop] = schema[prop];
8181
}
8282
} else {
83-
this[prop] = schema[prop];
83+
if (prop === 'payload' && this.payload !== undefined) {
84+
schema[prop].forEach(item => {
85+
this.payload[item.key] = item.value;
86+
});
87+
} else {
88+
this[prop] = schema[prop];
89+
}
8490
}
8591
});
8692
}

0 commit comments

Comments
 (0)