Skip to content

Commit

Permalink
fix(icons): console warn for missing aliases instead of throwing error
Browse files Browse the repository at this point in the history
  • Loading branch information
johnleider committed Apr 15, 2024
1 parent e30e781 commit 82abf1b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/vuetify/src/composables/icons.tsx
Expand Up @@ -3,7 +3,7 @@ import { aliases, mdi } from '@/iconsets/mdi'

// Utilities
import { computed, inject, unref } from 'vue'
import { defineComponent, genericComponent, mergeDeep, propsFactory } from '@/util'
import { consoleWarn, defineComponent, genericComponent, mergeDeep, propsFactory } from '@/util'

// Types
import type { InjectionKey, JSXComponent, PropType, Ref } from 'vue'
Expand Down Expand Up @@ -223,7 +223,7 @@ export const useIcon = (props: Ref<IconValue | undefined>) => {
}
}

if (!icon) throw new Error(`Could not find aliased icon "${iconAlias}"`)
if (!icon) consoleWarn(`Could not find aliased icon "${iconAlias}"`)

if (Array.isArray(icon)) {
return {
Expand Down

0 comments on commit 82abf1b

Please sign in to comment.