From d57647a77a145ff6e81d3a71550e98e3eaf3a842 Mon Sep 17 00:00:00 2001 From: Baptiste Leproux Date: Thu, 20 Oct 2022 11:34:58 +0200 Subject: [PATCH] fix(icon): hydratation warning when loading same icon twice (#99) --- src/runtime/components/elements/Icon.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/runtime/components/elements/Icon.vue b/src/runtime/components/elements/Icon.vue index f3f6e14a6b..420588d7ff 100644 --- a/src/runtime/components/elements/Icon.vue +++ b/src/runtime/components/elements/Icon.vue @@ -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 })