Skip to content

Commit 93dae66

Browse files
committed
fix: icon logic
1 parent 4b013c6 commit 93dae66

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/Preview/CloseBtn.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ export interface CloseBtnProps {
99
export default function CloseBtn(props: CloseBtnProps) {
1010
const { prefixCls, icon, onClick } = props;
1111

12-
if (icon === false) {
12+
if (icon === false || icon === null) {
1313
return null;
1414
}
1515

tests/preview.test.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -660,7 +660,7 @@ describe('Preview', () => {
660660
}),
661661
);
662662

663-
expect(container.querySelector('.rc-image-close')).toBeFalsy();
663+
expect(container.querySelector('.rc-image-preview-close')).toBeFalsy();
664664
});
665665

666666
it('Customize Group preview props', () => {

0 commit comments

Comments
 (0)