Skip to content

Commit

Permalink
check entity type before accessing states
Browse files Browse the repository at this point in the history
  • Loading branch information
chriskalmar committed Jan 30, 2021
1 parent 5206254 commit 6c2d0b6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/engine/entity/systemAttributes.ts
Expand Up @@ -105,7 +105,7 @@ export const systemAttributeState: Attribute = {
...attribute,
validate: undefined, // delete from props as it would be handled as a data type validator
name: camelCase(`${entity.name}-instance-state`),
states: entity.states,
states: isEntity(entity) ? entity.states : undefined,
}),
required: true,
defaultValue: (_: any, mutation: Mutation) => {
Expand Down

0 comments on commit 6c2d0b6

Please sign in to comment.