fix: 🐛 data attributes without value outputting as "true"

pull/2804/head
Christian Kaisermann 5 years ago
parent 298ae8ec23
commit 335f77cc48

@ -187,7 +187,7 @@ export default class AttributeWrapper {
: property_name
? `${element.var}.${property_name} = ${value};`
: is_dataset
? `${element.var}.dataset.${camel_case_name} = ${value};`
? `${element.var}.dataset.${camel_case_name} = ${value === true ? '""' : value};`
: `${method}(${element.var}, "${name}", ${value === true ? '""' : value});`
);

@ -0,0 +1,3 @@
export default {
html: '<div data-potato=""></div>',
};
Loading…
Cancel
Save