[FIX] qweb: t-component + class with extra whitespaces

Crashed due to `DOMTokenList.add(string)` requiring non-empty string.
This commit is contained in:
Alexandre Kühn
2019-06-25 10:14:16 +02:00
committed by Géry Debongnie
parent cc50a2e3bb
commit 4a5db0c283
2 changed files with 19 additions and 1 deletions
+2 -1
View File
@@ -475,7 +475,8 @@ QWeb.addDirective({
if (classAttr) {
classCode =
classAttr
.split(" ")
.trim()
.split(/\s+/)
.map(c => `vn.elm.classList.add('${c}')`)
.join(";") + ";";
}