Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 1 addition & 5 deletions packages/components/src/__internal__/components/icon.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import DOMPurify from 'dompurify'
import { h } from 'vue'

h

Check warning on line 5 in packages/components/src/__internal__/components/icon.tsx

View workflow job for this annotation

GitHub Actions / lint

eslint(no-unused-expressions)

Expected expression to be used

type IconProps = {
icon?: string | null
Expand All @@ -15,11 +15,7 @@
<span
class={clsx('milkdown-icon', className)}
onPointerdown={onClick}
ref={(el) => {
if (el && icon) {
;(el as HTMLElement).innerHTML = DOMPurify.sanitize(icon.trim())
}
}}
innerHTML={icon ? DOMPurify.sanitize(icon.trim()) : undefined}
/>
)
}
Expand Down
Loading