Skip to content

Commit f465ca3

Browse files
committed
fix: Duplicate cleanCustomBage usage
1 parent 0596d33 commit f465ca3

File tree

1 file changed

+2
-8
lines changed

1 file changed

+2
-8
lines changed

src/utils.ts

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -96,15 +96,9 @@ export const cleanBadge = (container?: HTMLElement | string) => {
9696
return;
9797
}
9898

99-
if (typeof container === 'string') {
100-
const customBadge = document.getElementById(container);
99+
const customBadge = typeof container === 'string' ? document.getElementById(container) : container;
101100

102-
cleanCustomBadge(customBadge);
103-
104-
return;
105-
}
106-
107-
cleanCustomBadge(container);
101+
cleanCustomBadge(customBadge);
108102
};
109103

110104
/**

0 commit comments

Comments
 (0)