Browse Source

fix: 🐞 fix calculation method of isLocal

AhJindeg 1 năm trước cách đây
mục cha
commit
cc39be8207
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  1. 1 1
      src/components/Icon/src/Icon.vue

+ 1 - 1
src/components/Icon/src/Icon.vue

@@ -22,7 +22,7 @@ const props = defineProps({
 
 const elRef = ref<ElRef>(null)
 
-const isLocal = computed(() => props.icon.startsWith('svg-icon:'))
+const isLocal = computed(() => props.icon?.startsWith('svg-icon:'))
 
 const symbolId = computed(() => {
   return unref(isLocal) ? `#icon-${props.icon.split('svg-icon:')[1]}` : props.icon