Skip to content

Commit fada2f9

Browse files
authored
fix: compatibility (#568)
1 parent 8f53aa8 commit fada2f9

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/shared/utils/index.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -243,12 +243,12 @@ export const transformCustomId = (
243243
};
244244

245245
export function removeHtmlTag(str: string) {
246-
if (!str || typeof str !== "string") {
246+
if (!str) {
247247
return str;
248248
}
249249
const result = str
250-
.replaceAll(/<[^>]*>/g, " ")
251-
.replaceAll(/\\s+/g, " ")
250+
.replace(/<[^>]*>/g, " ")
251+
.replace(/\\s+/g, " ")
252252
.trim();
253253
if (!result) {
254254
return str;

0 commit comments

Comments
 (0)