Skip to content

Commit 1a07fd9

Browse files
committed
fix: Harden Dispose
1 parent f620a81 commit 1a07fd9

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/bunit/Rendering/BunitRenderer.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -234,6 +234,11 @@ public Task DisposeComponents()
234234
disposalTasks.Clear();
235235
});
236236

237+
if (returnTask.IsFaulted && returnTask.Exception is not null)
238+
{
239+
HandleException(returnTask.Exception);
240+
}
241+
237242
rootComponents.Clear();
238243
AssertNoUnhandledExceptions();
239244
}

0 commit comments

Comments
 (0)