Skip to content

Commit 6108294

Browse files
authored
fix(ellipsistext): add judge for EllipsisText getStyle (#610)
fix #609
1 parent 5fe556b commit 6108294

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/ellipsisText/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ const EllipsisText = (props: IEllipsisTextProps) => {
8383
}
8484
// Compatible width IE8
8585
// @ts-ignore
86-
return window.getComputedStyle(dom)[attr] || dom.currentStyle[attr];
86+
return window.getComputedStyle(dom)?.[attr] || dom.currentStyle?.[attr];
8787
};
8888

8989
/**

0 commit comments

Comments
 (0)