Skip to content

Commit

Permalink
fix: menu android freezing issue
Browse files Browse the repository at this point in the history
  • Loading branch information
mayank-96 committed Apr 19, 2022
1 parent e9ae1f9 commit ae43d01
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/components/primitives/Overlay/Overlay.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,10 @@ export function Overlay({
styleObj.display = exited && !isOpen ? 'none' : 'flex';
}

if (unmountOnExit && !isOpen && exited) {
return null;
}

if (Platform.OS === 'android' && useRNModalOnAndroid) {
return (
<ExitAnimationContext.Provider value={{ exited, setExited }}>
Expand All @@ -58,10 +62,6 @@ export function Overlay({
);
}

if (unmountOnExit && !isOpen && exited) {
return null;
}

return (
//@ts-ignore
<OverlayContainer style={{ ...styleObj }}>
Expand Down

0 comments on commit ae43d01

Please sign in to comment.