[FIX] blockdom: ignore attributes with undefined value

This commit is contained in:
Géry Debongnie
2021-12-13 14:41:07 +01:00
committed by Aaron Bohy
parent 14a6289f60
commit 63fbcf99fd
4 changed files with 49 additions and 1 deletions
+1 -1
View File
@@ -16,7 +16,7 @@ const wordRegexp = /\s+/;
export function createAttrUpdater(attr: string): Setter<HTMLElement> {
return function (this: HTMLElement, value: any) {
if (value !== false) {
if (value !== false && value !== undefined) {
setAttribute.call(this, attr, value === true ? "" : value);
}
};