diff --git a/frontend/app/modals/typeaheadmodal.tsx b/frontend/app/modals/typeaheadmodal.tsx index 9bac414f7..6784a115f 100644 --- a/frontend/app/modals/typeaheadmodal.tsx +++ b/frontend/app/modals/typeaheadmodal.tsx @@ -94,7 +94,9 @@ const TypeAheadModal = ({ const suggestionsRef = useRef(null); useLayoutEffect(() => { - if (modalRef.current || inputRef.current || suggestionsRef.current || suggestionsWrapperRef.current) return; + if (!modalRef.current || !inputRef.current || !suggestionsRef.current || !suggestionsWrapperRef.current) { + return; + } const modalStyles = window.getComputedStyle(modalRef.current); const paddingTop = parseFloat(modalStyles.paddingTop) || 0;