Skip to content

Commit 66ac846

Browse files
committed
fix: modal: get rid of optional chaining
1 parent b84fe52 commit 66ac846

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

lib/modal.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,9 @@ const onMainClick = currify((overlayClick, event) => {
9696
});
9797

9898
const close = (event) => {
99-
event?.stopPropagation();
99+
if (event)
100+
event.stopPropagation();
101+
100102
const el = query('main');
101103

102104
const {

0 commit comments

Comments
 (0)