Fix unexpected "false" texts

This commit is contained in:
redphx 2024-07-20 05:43:32 +07:00
parent 7db004ede3
commit a268e49280

View File

@ -50,7 +50,7 @@ function createElement<T=HTMLElement>(elmName: string, props: {[index: string]:
if (arg instanceof Node) {
$elm.appendChild(arg);
} else if (arg !== null && typeof arg !== 'undefined') {
} else if (arg !== null && arg !== false && typeof arg !== 'undefined') {
$elm.appendChild(document.createTextNode(arg));
}
}