Skip to content
This repository was archived by the owner on Nov 4, 2025. It is now read-only.

Commit ceaa4ba

Browse files
kerm1itzachguo
andauthored
fix: compatibility for IE11 (#81)
Co-authored-by: Zach Guo <3478203+zachguo@users.noreply.github.com>
1 parent dbe2466 commit ceaa4ba

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/util.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ export function monitorResize(element: HTMLElement, callback: Function) {
3333
let prevHeight: number = null;
3434

3535
function onResize([{ target }]: ResizeObserverEntry[]) {
36-
if (!document.contains(target)) return;
36+
if (!document.documentElement.contains(target)) return;
3737
const { width, height } = target.getBoundingClientRect();
3838
const fixedWidth = Math.floor(width);
3939
const fixedHeight = Math.floor(height);

0 commit comments

Comments
 (0)