diff --git a/.changeset/fast-taxis-smash.md b/.changeset/fast-taxis-smash.md deleted file mode 100644 index 9d332261..00000000 --- a/.changeset/fast-taxis-smash.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'xstate-viz-app': patch ---- - -Fixes issue where raise actions were causing visualizer to crash diff --git a/src/ActionViz.tsx b/src/ActionViz.tsx index c5b47367..bc61bd69 100644 --- a/src/ActionViz.tsx +++ b/src/ActionViz.tsx @@ -64,14 +64,9 @@ export const ActionType: React.FC<{ title?: string }> = ({ export const RaiseActionLabel: React.FC<{ action: PotentiallyStructurallyCloned>; }> = ({ action }) => { - const eventType = - typeof action.event === 'object' && action.event !== null - ? action.event.type ?? unknown - : `${action.event}`; - return ( - raise {eventType} + raise {action.event} ); };