Skip to content

Commit

Permalink
fix(icon): hydratation warning when loading same icon twice
Browse files Browse the repository at this point in the history
  • Loading branch information
larbish committed Oct 20, 2022
1 parent aa97f26 commit 30a3a64
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/runtime/components/elements/Icon.vue
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ const component = computed(() => nuxtApp.vueApp.component(props.name))
const loadIconComponent = (name: string) => {
state.value = state.value || {}
if (nuxtApp.vueApp.component(props.name) || state.value[name] || state.value[name] === null) { return }
if (nuxtApp.vueApp.component(props.name) || state.value[name] || state.value[name] === null) { return state.value[name] }
state.value[name] = loadIcon(name)
.then((res) => { state.value[name] = res })
Expand Down

0 comments on commit 30a3a64

Please sign in to comment.