mirror of
https://github.com/odoo/owl.git
synced 2025-10-06 19:59:41 +07:00
[FIX] qweb: properly handle empty class attribute
The classList.add method actually crashes when given an empty string (or a string with just white spaces). closes #530
This commit is contained in:
+1
-1
@@ -219,7 +219,7 @@ function updateClass(oldVnode: VNode, vnode: VNode): void {
|
||||
elm = vnode.elm as Element;
|
||||
|
||||
for (name in oldClass) {
|
||||
if (!klass[name]) {
|
||||
if (name && !klass[name]) {
|
||||
elm.classList.remove(name);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user