Skip to content

Commit

Permalink
add type check
Browse files Browse the repository at this point in the history
  • Loading branch information
tienifr committed Nov 17, 2023
1 parent 58d740c commit 2f0e1ee
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/components/Modal/BaseModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ function BaseModal(

useEffect(() => {
isVisibleRef.current = isVisible;
let removeOnCloseListener;
let removeOnCloseListener: () => void;
if (isVisible) {
Modal.willAlertModalBecomeVisible(true);
// To handle closing any modal already visible when this modal is mounted, i.e. PopoverReportActionContextMenu
Expand Down
1 change: 0 additions & 1 deletion src/components/PopoverWithoutOverlay/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ import * as Modal from '@userActions/Modal';
function Popover(props) {
const styles = useThemeStyles();
const {onOpen, close} = React.useContext(PopoverContext);

const {modalStyle, modalContainerStyle, shouldAddTopSafeAreaMargin, shouldAddBottomSafeAreaMargin, shouldAddTopSafeAreaPadding, shouldAddBottomSafeAreaPadding} = getModalStyles(
'popover',
{
Expand Down
3 changes: 1 addition & 2 deletions src/libs/actions/Modal.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,7 @@ function close(onModalCloseCallback: () => void, isNavigating = true) {
return;
}
onModalClose = onModalCloseCallback;
const reverseCloseModals = [...closeModals].reverse();
reverseCloseModals.forEach((onClose) => {
[...closeModals].reverse().forEach((onClose) => {
onClose(isNavigating);
});
}
Expand Down

0 comments on commit 2f0e1ee

Please sign in to comment.