Skip to content

Commit 07e9928

Browse files
committed
chore: use generics
1 parent 7abe2cd commit 07e9928

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

app/components/Brand/Customize.vue

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -43,12 +43,12 @@ function getCustomSvgString(): string {
4343
const el = customLogoRef.value?.$el as SVGElement | undefined
4444
if (!el) return ''
4545
const clone = el.cloneNode(true) as SVGElement
46-
clone.querySelectorAll('[fill="currentColor"]').forEach(path => {
47-
;(path as SVGElement).setAttribute('fill', customBgDark.value ? '#fafafa' : '#0a0a0a')
46+
clone.querySelectorAll<SVGElement>('[fill="currentColor"]').forEach(path => {
47+
path.setAttribute('fill', customBgDark.value ? '#fafafa' : '#0a0a0a')
4848
})
49-
clone.querySelectorAll('[fill="var(--accent)"]').forEach(path => {
49+
clone.querySelectorAll<SVGElement>('[fill="var(--accent)"]').forEach(path => {
5050
const style = getComputedStyle(path as SVGElement)
51-
;(path as SVGElement).setAttribute('fill', style.fill || activeAccentColor.value)
51+
path.setAttribute('fill', style.fill || activeAccentColor.value)
5252
})
5353
clone.removeAttribute('aria-hidden')
5454
clone.removeAttribute('class')

0 commit comments

Comments
 (0)