fix: modalElIterator可能为空,导致报错 (#3738)
This commit is contained in:
parent
96ac362fa6
commit
162a0d0252
|
|
@ -194,6 +194,7 @@ export function useTableScroll(
|
||||||
let modalElIterator: HTMLElement = tableEl.parentElement!;
|
let modalElIterator: HTMLElement = tableEl.parentElement!;
|
||||||
let modalIsFullscreen = false;
|
let modalIsFullscreen = false;
|
||||||
while (modalElIterator !== document.body) {
|
while (modalElIterator !== document.body) {
|
||||||
|
if(!modalElIterator) break;
|
||||||
if (modalElIterator.classList.contains('ant-modal')) {
|
if (modalElIterator.classList.contains('ant-modal')) {
|
||||||
modalEl = modalElIterator;
|
modalEl = modalElIterator;
|
||||||
modalWrapEl = modalEl.parentElement;
|
modalWrapEl = modalEl.parentElement;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue