Skip to content

Commit 162a0d0

Browse files
authored
fix: modalElIterator可能为空,导致报错 (#3738)
1 parent 96ac362 commit 162a0d0

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/components/Table/src/hooks/useTableScroll.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -194,6 +194,7 @@ export function useTableScroll(
194194
let modalElIterator: HTMLElement = tableEl.parentElement!;
195195
let modalIsFullscreen = false;
196196
while (modalElIterator !== document.body) {
197+
if(!modalElIterator) break;
197198
if (modalElIterator.classList.contains('ant-modal')) {
198199
modalEl = modalElIterator;
199200
modalWrapEl = modalEl.parentElement;

0 commit comments

Comments
 (0)