in src/utils/is_slot_empty.js [6:28]
export function isVnodeEmpty(vnode) {
if (!vnode || (Comment && vnode.type === Comment)) {
return true;
}
if (Text && vnode.type === Text && !vnode.children.trim()) {
// Vue.js 3 text string is located in the children
return true;
}
if (Array.isArray(vnode)) {
// eslint-disable-next-line unicorn/no-array-callback-reference
return vnode.every(isVnodeEmpty);
}
if (Fragment && vnode.type === Fragment) {
// Vue.js 3 fragment, check children
// eslint-disable-next-line unicorn/no-array-callback-reference
return vnode.children.every(isVnodeEmpty);
}
return false;
}