fix: modalElIterator可能为空,导致报错 (#3738)

This commit is contained in:
KaneOne 2024-04-13 21:41:03 +08:00 committed by GitHub
parent 96ac362fa6
commit 162a0d0252
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -194,6 +194,7 @@ export function useTableScroll(
let modalElIterator: HTMLElement = tableEl.parentElement!;
let modalIsFullscreen = false;
while (modalElIterator !== document.body) {
if(!modalElIterator) break;
if (modalElIterator.classList.contains('ant-modal')) {
modalEl = modalElIterator;
modalWrapEl = modalEl.parentElement;