Skip to content
This repository was archived by the owner on Sep 11, 2024. It is now read-only.

Commit 446734b

Browse files
committed
Emit ModalManagerEvent.Opened at false if there is no more dialog
1 parent f4fce5e commit 446734b

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/Modal.tsx

+4-2
Original file line numberDiff line numberDiff line change
@@ -330,11 +330,13 @@ export class ModalManager extends TypedEventEmitter<ModalManagerEvent, HandlerMa
330330
}
331331

332332
/**
333-
* Emit the opened event with false
333+
* Emit the opened event with false if there is no modal open
334334
* @private
335335
*/
336336
private emitClosed(): void {
337-
this.emit(ModalManagerEvent.Opened, false);
337+
if (!this.getCurrentModal()) {
338+
this.emit(ModalManagerEvent.Opened, false);
339+
}
338340
}
339341

340342
private onBackgroundClick = (): void => {

0 commit comments

Comments
 (0)