Skip to content

Commit

Permalink
Do not crash on unhandled inspection event type
Browse files Browse the repository at this point in the history
  • Loading branch information
davidkpiano committed Feb 16, 2024
1 parent 33b3512 commit 7d569b1
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
5 changes: 5 additions & 0 deletions .changeset/wicked-squids-argue.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@statelyai/inspect": patch
---

Do not crash on unhandled inspection event type
4 changes: 2 additions & 2 deletions src/createInspector.ts
Original file line number Diff line number Diff line change
Expand Up @@ -213,8 +213,8 @@ export function convertXStateEvent(
} satisfies StatelySnapshotEvent;
}
default: {
throw new Error(
`Invalid inspection event type: ${(inspectionEvent as any).type}`
console.warn(
`Unhandled inspection event type: ${(inspectionEvent as any).type}`
);
}
}
Expand Down

0 comments on commit 7d569b1

Please sign in to comment.