mirror of
https://github.com/ArthurDanjou/ui.git
synced 2026-02-03 13:47:55 +01:00
fix(icon): hydratation warning when loading same icon twice (#99)
This commit is contained in:
@@ -26,7 +26,7 @@ const component = computed(() => nuxtApp.vueApp.component(props.name))
|
|||||||
|
|
||||||
const loadIconComponent = (name: string) => {
|
const loadIconComponent = (name: string) => {
|
||||||
state.value = state.value || {}
|
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)
|
state.value[name] = loadIcon(name)
|
||||||
.then((res) => { state.value[name] = res })
|
.then((res) => { state.value[name] = res })
|
||||||
|
|||||||
Reference in New Issue
Block a user