From d3ca860ec72091b56380d91768361dcb6bf47d9d Mon Sep 17 00:00:00 2001 From: David Khourshid Date: Thu, 3 Aug 2023 20:50:05 -0400 Subject: [PATCH] Revert "Fix ActionViz" --- .changeset/fast-taxis-smash.md | 5 ----- src/ActionViz.tsx | 7 +------ 2 files changed, 1 insertion(+), 11 deletions(-) delete mode 100644 .changeset/fast-taxis-smash.md 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} ); };