mirror of
https://github.com/odoo/owl.git
synced 2025-10-06 19:59:41 +07:00
[FIX] qweb: t-component + class with extra whitespaces
Crashed due to `DOMTokenList.add(string)` requiring non-empty string.
This commit is contained in:
committed by
Géry Debongnie
parent
cc50a2e3bb
commit
4a5db0c283
@@ -475,7 +475,8 @@ QWeb.addDirective({
|
||||
if (classAttr) {
|
||||
classCode =
|
||||
classAttr
|
||||
.split(" ")
|
||||
.trim()
|
||||
.split(/\s+/)
|
||||
.map(c => `vn.elm.classList.add('${c}')`)
|
||||
.join(";") + ";";
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user