Skip to content

Commit

Permalink
fix lint
Browse files Browse the repository at this point in the history
  • Loading branch information
dukenv0307 committed Oct 8, 2023
1 parent 8a18248 commit 7d4892a
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/components/PopoverWithoutOverlay/index.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React, { useRef } from 'react';
import React, {useRef} from 'react';
import {View} from 'react-native';
import {SafeAreaInsetsContext} from 'react-native-safe-area-context';
import {PopoverContext} from '../PopoverProvider';
Expand Down Expand Up @@ -43,11 +43,11 @@ function Popover(props) {
Modal.willAlertModalBecomeVisible(props.isVisible);

// We prevent setting closeModal function to null when the component is invisible the first time it is rendered
if ((prevIsVisible === props.isVisible) && (!firstRenderRef.current || !props.isVisible)) {
firstRenderRef.current = false;
if (prevIsVisible === props.isVisible && (!firstRenderRef.current || !props.isVisible)) {
firstRenderRef.current = false;
return;
}
firstRenderRef.current = false;
firstRenderRef.current = false;
Modal.setCloseModal(props.isVisible ? () => props.onClose(props.anchorRef) : null);

// We want this effect to run strictly ONLY when isVisible prop changes
Expand Down

0 comments on commit 7d4892a

Please sign in to comment.