Added array support in class attribute

pull/2966/head
Dmitriy Blinov 6 years ago
parent 6a388a9f86
commit 3413e1eb59

@ -146,9 +146,15 @@ export default class AttributeWrapper {
${updater}
`);
} else if (property_name) {
block.builders.hydrate.add_line(
`${element.var}.${property_name} = ${init};`
);
if (property_name === attribute_lookup.class.property_name) {
block.builders.hydrate.add_line(
`${element.var}.${property_name} = [].concat(${init} || []).join(' ');`
);
} else {
block.builders.hydrate.add_line(
`${element.var}.${property_name} = ${init};`
);
}
updater = `${element.var}.${property_name} = ${should_cache ? last : value};`;
} else if (is_dataset) {
block.builders.hydrate.add_line(

Loading…
Cancel
Save