Skip to content

Commit b047418

Browse files
committed
Add async unmount
1 parent a592237 commit b047418

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

packages/usdk/packages/upstreet-agent/packages/react-agents/classes/agent-renderer.tsx

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -378,8 +378,12 @@ export class AgentRenderer {
378378
agents,
379379
};
380380
}
381-
unmount() {
382-
this.reconciler.updateContainer(null, this.root, null, () => {});
381+
async unmount() {
382+
await new Promise((accept, reject) => {
383+
this.reconciler.updateContainer(null, this.root, null, () => {
384+
accept(null);
385+
});
386+
});
383387
}
384388

385389
// note: needs to be async to wait for React to resolves

0 commit comments

Comments
 (0)