Skip to content

Commit

Permalink
Merge pull request #21 from statelyai/davidkpiano/do-not-warn-for-act…
Browse files Browse the repository at this point in the history
…ion-or-microstep-events

Do not warn for XState events
  • Loading branch information
davidkpiano authored Mar 4, 2024
2 parents b472d1b + a225b37 commit 06be9c4
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .changeset/stupid-crews-crash.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@statelyai/inspect": patch
---

Do not warn for XState events
4 changes: 4 additions & 0 deletions src/createInspector.ts
Original file line number Diff line number Diff line change
Expand Up @@ -215,6 +215,10 @@ export function convertXStateEvent(
} satisfies StatelySnapshotEvent;
}
default: {
// Ignore future XState inspection events (assume that they are valid)
if (inspectionEvent.type.startsWith('@xstate.')) {
return undefined;
}
console.warn(
`Unhandled inspection event type: ${(inspectionEvent as any).type}`
);
Expand Down

0 comments on commit 06be9c4

Please sign in to comment.