Skip to content

Commit 51933ef

Browse files
fix(core): prevent errors on contract cleanup (#58614)
If contract cleanup is called more than once, the assertion that the container manager will be present results in exceptions. PR Close #58614
1 parent 71ee81a commit 51933ef

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

packages/core/primitives/event-dispatch/src/eventcontract.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -254,7 +254,7 @@ export class EventContract implements UnrenamedEventContract {
254254
* after it has been cleaned up.
255255
*/
256256
cleanUp() {
257-
this.containerManager!.cleanUp();
257+
this.containerManager?.cleanUp();
258258
this.containerManager = null;
259259
this.eventHandlers = {};
260260
this.browserEventTypeToExtraEventTypes = {};

0 commit comments

Comments
 (0)