Check if entities is an array (#5193)

This commit is contained in:
Bram Kragten 2020-03-13 17:48:49 +01:00 committed by GitHub
parent 330eb0957b
commit 0c3c007faf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -44,7 +44,7 @@ const addEntities = (entities: Set<string>, obj) => {
if (obj.entity) {
addEntityId(entities, obj.entity);
}
if (obj.entities) {
if (obj.entities && Array.isArray(obj.entities)) {
obj.entities.forEach((entity) => addEntityId(entities, entity));
}
if (obj.card) {