diff --git a/.changeset/wicked-squids-argue.md b/.changeset/wicked-squids-argue.md new file mode 100644 index 0000000..965af9d --- /dev/null +++ b/.changeset/wicked-squids-argue.md @@ -0,0 +1,5 @@ +--- +"@statelyai/inspect": patch +--- + +Do not crash on unhandled inspection event type diff --git a/src/createInspector.ts b/src/createInspector.ts index ffc21f2..d0f48dd 100644 --- a/src/createInspector.ts +++ b/src/createInspector.ts @@ -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}` ); } }