From 7d4892ab17c1cbf7e4443fc5e92e842a01eaee55 Mon Sep 17 00:00:00 2001 From: dukenv0307 Date: Sun, 8 Oct 2023 15:32:05 +0700 Subject: [PATCH] fix lint --- src/components/PopoverWithoutOverlay/index.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/components/PopoverWithoutOverlay/index.js b/src/components/PopoverWithoutOverlay/index.js index 12c5ee16a75f..d35637958f1d 100644 --- a/src/components/PopoverWithoutOverlay/index.js +++ b/src/components/PopoverWithoutOverlay/index.js @@ -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'; @@ -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