fix: resolve BasicIcon setAttribute crash and use valid icon name in RequiredKycModal
This commit is contained in:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user