mirror of
https://github.com/wavetermdev/waveterm.git
synced 2025-01-21 21:32:13 +01:00
fix condition
This commit is contained in:
parent
7b866ed3a8
commit
30c1d56be6
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user