mirror of
https://github.com/marko-js/marko.git
synced 2025-12-08 19:26:05 +00:00
Fixed #13 remove-dashes now works for dynamic attributes even if target-property is null
This commit is contained in:
parent
16eb47eb97
commit
5f994f8f96
@ -366,11 +366,11 @@ module.exports = function transform(node, compiler, template) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
forEachProp(function (name, value, attrDef) {
|
forEachProp(function (name, value, attrDef) {
|
||||||
if (attrDef.dynamicAttribute && attrDef.targetProperty) {
|
if (attrDef.dynamicAttribute) {
|
||||||
if (attrDef.removeDashes === true) {
|
if (attrDef.removeDashes === true) {
|
||||||
name = removeDashes(name);
|
name = removeDashes(name);
|
||||||
}
|
}
|
||||||
if (node.addDynamicAttribute) {
|
if (node.addDynamicAttribute && attrDef.targetProperty) {
|
||||||
node.addDynamicAttribute(name, value);
|
node.addDynamicAttribute(name, value);
|
||||||
node.setDynamicAttributesProperty(attrDef.targetProperty);
|
node.setDynamicAttributesProperty(attrDef.targetProperty);
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user