diff --git a/src/lib/components/common/Tooltip.svelte b/src/lib/components/common/Tooltip.svelte index fca2b0e8..62ca4eb8 100644 --- a/src/lib/components/common/Tooltip.svelte +++ b/src/lib/components/common/Tooltip.svelte @@ -10,18 +10,19 @@ $: if (tooltipElement && content) { if (tooltipInstance) { - tooltipInstance[0]?.destroy(); + tooltipInstance.setContent(content); + } else { + tooltipInstance = tippy(tooltipElement, { + content: content, + placement: placement, + allowHTML: true + }); } - tooltipInstance = tippy(tooltipElement, { - content: content, - placement: placement, - allowHTML: true - }); } onDestroy(() => { if (tooltipInstance) { - tooltipInstance[0]?.destroy(); + tooltipInstance.destroy(); } });