fix: v-tippy not updating if content set to undefined

This commit is contained in:
Kristaps Fabians Geikins
2025-05-22 16:20:13 +03:00
parent 41340a06b5
commit 3e8c21ac05
+5
View File
@@ -68,6 +68,11 @@ const directive: Directive = {
updated(el, binding) {
const opts = typeof binding.value === "string" ? { content: binding.value } : binding.value || {}
// any kind of falsy content value, even undefined, should be treated as null - 'no tooltip to show'
if (!opts.content) {
opts.content = null
}
if (el.getAttribute('title') && !opts.content) {
opts.content = el.getAttribute('title')