Skip to content

Commit

Permalink
refactor: check app state instead of eating the destroy error
Browse files Browse the repository at this point in the history
  • Loading branch information
trezy committed Sep 4, 2024
1 parent f429cd6 commit 8e2ad70
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions src/helpers/unmountApplication.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,12 @@ export function unmountApplication(root: Root)
{
reconciler.updateContainer(null, fiber, null, () =>
{
try
if (root.applicationState.app)
{
root.applicationState.app.destroy();
roots.delete(root.internalState.canvas!);
}
catch (error)
{
/* ... */
}

roots.delete(root.internalState.canvas!);
});
}
}
Expand Down

0 comments on commit 8e2ad70

Please sign in to comment.