mirror of
https://github.com/odoo/owl.git
synced 2025-10-06 19:59:41 +07:00
[FIX] qweb: do not override t-att-class with class
There was some code in qweb to make sure that we support setting class
and t-att-class on the same html element:
<div class="some class" t-att-class="{b: true}">...</div>
But the code did not work in the other direction:
<div t-att-class="{b: true}" class="some class">...</div>
With this commit, we just add the missing if statement
closes #664
This commit is contained in:
@@ -1,5 +1,20 @@
|
||||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||
|
||||
exports[`attributes class and t-att-class should combine together 1`] = `
|
||||
"function anonymous(context, extra
|
||||
) {
|
||||
// Template name: \\"test\\"
|
||||
let utils = this.constructor.utils;
|
||||
let scope = Object.create(context);
|
||||
let h = this.h;
|
||||
let _1 = utils.toObj(scope['value']);
|
||||
Object.assign(_1, {'hello':true})
|
||||
let c3 = [], p3 = {key:3,class:_1};
|
||||
let vn3 = h('div', p3, c3);
|
||||
return vn3;
|
||||
}"
|
||||
`;
|
||||
|
||||
exports[`attributes class and t-attf-class with ternary operation 1`] = `
|
||||
"function anonymous(context, extra
|
||||
) {
|
||||
|
||||
Reference in New Issue
Block a user