Skip to content

Commit 18d2b45

Browse files
committed
fix: SvgIcon getAttribute
1 parent 3ab8448 commit 18d2b45

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/components/SvgIcon.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@ watchEffect(() => {
2424
ref="actualEl"
2525
class="SvgIcon"
2626
:name="name"
27-
:viewBox="svgEl.getAttributeNS(null, 'viewBox') || undefined"
28-
:fill="svgEl.getAttribute('fill') || undefined"
27+
:viewBox="svgEl.getAttribute('viewBox') ?? undefined"
28+
:fill="svgEl.getAttribute('fill') ?? undefined"
2929
></svg>
3030
</template>
3131
<style>

0 commit comments

Comments
 (0)