Skip to content

A one-of-a-kind resume builder that keeps your privacy in mind. Completely secure, customizable, portable, open-source and free forever. Try it out today!

Fix TypeError

ADecametre817ec969635e
diff --git a/libs/utils/src/namespaces/string.ts b/libs/utils/src/namespaces/string.ts
index ed866d9bd..3b540cf73 100644
--- a/libs/utils/src/namespaces/string.ts
+++ b/libs/utils/src/namespaces/string.ts
@@ -61,7 +61,7 @@ export const sanitize = (html: string, options?: sanitizeHtml.IOptions) => {
return sanitizeHtml(html, {
...options,
allowedTags: [
- ...options?.allowedTags,
+ ...(options?.allowedTags ?? []),
// default tags (https://www.npmjs.com/package/sanitize-html#default-options)
"address", "article", "aside", "footer", "header", "h1", "h2", "h3", "h4",
"h5", "h6", "hgroup", "main", "nav", "section", "blockquote", "dd", "div",