Skip to content

Commit

Permalink
actorId -> targetId
Browse files Browse the repository at this point in the history
  • Loading branch information
davidkpiano committed Nov 4, 2024
1 parent 91128d8 commit 002670f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion packages/core/src/actions/send.ts
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ function resolveSendTo(
snapshot,
{
to: targetActorRef,
actorId: typeof resolvedTarget === 'string' ? resolvedTarget : undefined,
targetId: typeof resolvedTarget === 'string' ? resolvedTarget : undefined,
event: resolvedEvent,
id,
delay: resolvedDelay
Expand Down
3 changes: 1 addition & 2 deletions packages/core/test/transition.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ import { createDoneActorEvent } from '../src/eventUtils';
import { initialTransition } from '../src/transition';
import assert from 'node:assert';
import { resolveReferencedActor } from '../src/utils';
import { parseArgs } from 'node:util';

describe('transition function', () => {
it('should capture actions', () => {
Expand Down Expand Up @@ -323,7 +322,7 @@ describe('transition function', () => {
expect.objectContaining({
type: 'xstate.sendTo',
params: expect.objectContaining({
actorId: 'someActor'
targetId: 'someActor'
})
})
);
Expand Down

0 comments on commit 002670f

Please sign in to comment.