mirror of
https://github.com/wavetermdev/waveterm
synced 2026-05-24 01:08:27 +00:00
fix condition
This commit is contained in:
parent
7b866ed3a8
commit
30c1d56be6
1 changed files with 3 additions and 1 deletions
|
|
@ -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 a new issue