fix: resolve BasicIcon setAttribute crash and use valid icon name in RequiredKycModal

This commit is contained in:
2026-11-10 15:24:52 +03:30
parent cec78883a2
commit b03808c442
2 changed files with 7 additions and 5 deletions
+6 -4
View File
@@ -33,10 +33,12 @@ const color = computed(() => {
})
onMounted(() => {
if (props.size) {
const svg: SVGElement = refIcon.value?.children[0] as SVGElement
svg.setAttribute('width', props.size as string)
svg.setAttribute('height', props.size as string)
if (props.size && refIcon.value) {
const svg = refIcon.value.children?.[0] as SVGElement | undefined
if (svg && typeof svg.setAttribute === 'function') {
svg.setAttribute('width', String(props.size))
svg.setAttribute('height', String(props.size))
}
}
})
</script>