Skip to content

Commit

Permalink
fix(utils): undefined html shouldn't throw on stripTags
Browse files Browse the repository at this point in the history
  • Loading branch information
ghiscoding committed Dec 9, 2023
1 parent 0ee39f0 commit 05361e7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/utils/src/stripTagsUtil.ts
Expand Up @@ -39,7 +39,7 @@ export function stripTags(htmlText: string | number | boolean | HTMLElement, all
if (html instanceof HTMLElement) {
html = html.innerHTML;
}
if (typeof html !== 'string') {
if (typeof html !== 'string' && html !== undefined) {
throw new TypeError(`'html' parameter must be a string`);
}

Expand Down

0 comments on commit 05361e7

Please sign in to comment.