hide undefined label in colorpicker in FF

This commit is contained in:
tophf 2022-06-02 21:52:49 +03:00
parent 0f3ba30066
commit cd88aff733

View File

@ -79,7 +79,7 @@
} }
const el = document.createElement(props.tag || 'div'); const el = document.createElement(props.tag || 'div');
el.className = toArray(cls).map(c => c ? CSS_PREFIX + c : '').join(' '); el.className = toArray(cls).map(c => c ? CSS_PREFIX + c : '').join(' ');
el.append(...toArray(children)); el.append(...toArray(children).filter(Boolean));
if (props) delete props.tag; if (props) delete props.tag;
return Object.assign(el, props); return Object.assign(el, props);
} }