mirror of
https://github.com/odoo/owl.git
synced 2025-10-06 19:59:41 +07:00
[FIX] qweb: fix overlapping multi-class in t-att-class
Previously, if two attributes in t-att-class shared some classes, their presence would be determined by the last attribute declared, instead of being present if any attribute containing it evaluates to true. This commit fixes that.
This commit is contained in:
committed by
Géry Debongnie
parent
9fe2da704e
commit
b242230e20
+2
-2
@@ -127,12 +127,12 @@ const UTILS: Utils = {
|
||||
return result;
|
||||
}
|
||||
// this is already an object, but we may need to split keys:
|
||||
// {'a': true, 'b c': true} should become {a: true, b: true, c: true}
|
||||
// {'a b': true, 'a c': false} should become {a: true, b: true, c: false}
|
||||
for (let key in expr) {
|
||||
const value = expr[key];
|
||||
const words = key.split(/\s+/);
|
||||
for (let word of words) {
|
||||
result[word] = value;
|
||||
result[word] = result[word] || value;
|
||||
}
|
||||
}
|
||||
return result;
|
||||
|
||||
Reference in New Issue
Block a user