Patch Changes
-
#5575
830db8bThanks @JSap0914! - FixedinitialTransition(andtransition) throwing"Actor with system ID '...' already exists"when the machine contains aninvokewith asystemId.Root cause:
createInertActorScopeusedcreateActor(logic)internally, which eagerly rangetInitialSnapshotduring construction and registered anysystemId-carrying child actors in the system. When the caller then rangetInitialSnapshot(ortransition) via the returned scope, the same system was reused, causing the duplicate-registration error.Fix: After creating the internal actor,
createInertActorScopenow replaces the actor's system reference with a freshly-created system. Child actors spawned by the subsequent caller-drivengetInitialSnapshot/transitioninvocation therefore register into a clean system with no pre-existing entries.const machine = createMachine({ initial: 'idle', states: { idle: { invoke: { src: fromPromise(async () => 42), systemId: 'myActor' // previously caused: "Actor with system ID 'myActor' already exists" } } } }); // Now works correctly — returns [snapshot, actions] without throwing const [snapshot, actions] = initialTransition(machine);
-
#5585
a551a2bThanks @RubenFricke! - Add missing https:// protocol to the Stately Studio link in the README