Skip to content

Commit 4f6dcdd

Browse files
authored
Merge pull request #46 from nobrayner/fix/45
fix: check if grandparent exists before using it
2 parents 5669618 + 4c031c8 commit 4f6dcdd

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

xstate/algorithm.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -289,7 +289,7 @@ def enter_states(
289289
grandparent = parent.parent
290290
internal_queue.append(Event(f"done.state.{parent.id}", s.donedata))
291291

292-
if is_parallel_state(grandparent):
292+
if grandparent and is_parallel_state(grandparent):
293293
if all(
294294
is_in_final_state(parent_state, configuration)
295295
for parent_state in get_child_states(grandparent)

0 commit comments

Comments
 (0)