fix: clicking outside modal closes modal again (#2984)

This commit is contained in:
Ryan Cohen
2022-08-25 13:28:44 +09:00
committed by GitHub
parent b925857dfa
commit 1a0053221b
2 changed files with 82 additions and 72 deletions

View File

@@ -359,12 +359,12 @@ const TvRequestModal = ({
const isOwner = editRequest && editRequest.requestedBy.id === user?.id;
return !data?.externalIds.tvdbId && searchModal.show ? (
return data && !data.externalIds.tvdbId && searchModal.show ? (
<SearchByNameModal
tvdbId={tvdbId}
setTvdbId={setTvdbId}
closeModal={() => setSearchModal({ show: false })}
loading={!data && !error}
loading={!error}
onCancel={onCancel}
modalTitle={intl.formatMessage(
is4k ? messages.request4ktitle : messages.requesttitle,