Fix process entity (#2177)

This commit is contained in:
Bram Kragten 2018-12-04 18:43:03 +01:00 committed by Zack Arnett
parent f680832f78
commit 1d7f574b9b

View File

@ -30,12 +30,11 @@ export const processConfigEntities = <T extends EntityConfig>(
`Entity object at position ${index} is missing entity field.`
);
}
config = entityConf as T;
} else {
throw new Error(`Invalid entity specified at position ${index}.`);
}
config = entityConf as T;
if (!isValidEntityId(config.entity)) {
throw new Error(
`Invalid entity ID at position ${index}: ${config.entity}`