瀏覽代碼

!455 fix: fix calculation method of isLocal
Merge pull request !455 from AhJindeg/hotfix/icon

芋道源码 1 年之前
父節點
當前提交
0895f9ffcb
共有 1 個文件被更改,包括 1 次插入1 次删除
  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