Skip to content
This repository has been archived by the owner on Feb 25, 2024. It is now read-only.

Commit

Permalink
Merge pull request #420 from statelyai/davidkpiano/fix-action-viz
Browse files Browse the repository at this point in the history
Fix ActionViz
  • Loading branch information
davidkpiano authored Aug 4, 2023
2 parents 3cf4ad7 + 39290c1 commit 27cbf4d
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/fast-taxis-smash.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'xstate-viz-app': patch
---

Fixes issue where raise actions were causing visualizer to crash
7 changes: 6 additions & 1 deletion src/ActionViz.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -64,9 +64,14 @@ export const ActionType: React.FC<{ title?: string }> = ({
export const RaiseActionLabel: React.FC<{
action: PotentiallyStructurallyCloned<RaiseAction<EventObject>>;
}> = ({ action }) => {
const eventType =
typeof action.event === 'object' && action.event !== null
? action.event.type ?? <em>unknown</em>

Check failure on line 69 in src/ActionViz.tsx

View workflow job for this annotation

GitHub Actions / cypress-tests

Property 'type' does not exist on type 'never'.
: `${action.event}`;

return (
<ActionType>
<strong>raise</strong> {action.event}
<strong>raise</strong> {eventType}
</ActionType>
);
};
Expand Down

1 comment on commit 27cbf4d

@vercel
Copy link

@vercel vercel bot commented on 27cbf4d Aug 4, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

xstate-viz – ./

xstate-viz-statelyai.vercel.app
xstate-viz-git-main-statelyai.vercel.app
viz-prod.stately.ai

Please sign in to comment.