Эх сурвалжийг харах

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

KaneOne 1 жил өмнө
parent
commit
162a0d0252

+ 1 - 0
src/components/Table/src/hooks/useTableScroll.ts

@@ -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;