statelyai/xactor

Spawning self-stopping jobs

marcusstenbeck opened this issue · 0 comments

I've attempted to spawn child-actors that complete and then stop themselves. It's based on the "watching" test. After spawning 3 messages there's an exception:

TypeError: Cannot read properties of undefined (reading '$$tag')
    at Actor.process (Actor.ts:127)
    at Actor.flush (Actor.ts:177)
    at Actor.receive (Actor.ts:113)
    at ActorRef.send (ActorRef.ts:31)
    at ActorSystem.send (ActorSystem.ts:35)
    at eval (VM72 index.tsx:35)
    at onSubmit (VM72 index.tsx:92)
    at HTMLUnknownElement.callCallback (react-dom.development.js:158)
    at Object.invokeGuardedCallbackDev (react-dom.development.js:198)
    at invokeGuardedCallback (react-dom.development.js:244)

Here's the live example: https://stackblitz.com/edit/react-ts-4ehstb?devtoolsheight=33&file=index.tsx