diff --git a/src/machines/bar.machine.ts b/src/machines/bar.machine.ts index e60582d..249cfaf 100644 --- a/src/machines/bar.machine.ts +++ b/src/machines/bar.machine.ts @@ -8,7 +8,7 @@ export const barMachine = hotspotMachine .withConfig({ actions: { updatePersons: (context) => { - context.persons.forEach((p) => p?.send('triggerDrink')); + context.persons.forEach((p) => p.send('triggerDrink')); return context; }, }, diff --git a/src/machines/toilet.machine.ts b/src/machines/toilet.machine.ts index 9838b4e..98b1f58 100644 --- a/src/machines/toilet.machine.ts +++ b/src/machines/toilet.machine.ts @@ -8,7 +8,7 @@ export const toiletMachine = hotspotMachine .withConfig({ actions: { updatePersons: (context) => { - context.persons.forEach((p) => p?.send('triggerPee')); + context.persons.forEach((p) => p.send('triggerPee')); return context; }, },