2
0

fix(editor): 🐛 Step undefined items duplicate

This commit is contained in:
Baptiste Arnaud
2022-03-28 14:47:41 +02:00
parent 84dda32b13
commit f869ca377a

View File

@ -124,7 +124,8 @@ export const stepTypeHasItems = (
export const stepHasItems = (
step: Step
): step is ConditionStep | ChoiceInputStep => 'items' in step
): step is ConditionStep | ChoiceInputStep =>
'items' in step && isDefined(step.items)
export const byId = (id?: string) => (obj: { id: string }) => obj.id === id