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

Commit

Permalink
set custom event origin to currentSessionId to be picked up by devtoo…
Browse files Browse the repository at this point in the history
…ls and sent to the inspected source
  • Loading branch information
farskid committed Sep 8, 2021
1 parent ccd5337 commit 450b577
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/simulationMachine.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -303,7 +303,10 @@ export const simulationMachine = simModel.createMachine(
(ctx, e) => {
return {
type: 'xstate.event',
event: e.event,
event: {
...e.event,
origin: e.event.origin || ctx.currentSessionId,
},
sessionId: ctx.currentSessionId,
};
},
Expand Down

0 comments on commit 450b577

Please sign in to comment.