mirror of
https://github.com/wavetermdev/backup.git
synced 2026-08-05 13:57:07 -07:00
fix condition
This commit is contained in:
@@ -94,7 +94,9 @@ const TypeAheadModal = ({
|
||||
const suggestionsRef = useRef<HTMLDivElement>(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;
|
||||
|
||||
Reference in New Issue
Block a user