Skip to content

Commit 01e2b27

Browse files
committed
Fix attributeBindings issue
1 parent 2b262bd commit 01e2b27

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

lib/__tests__/__snapshots__/transform.js.snap

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ foo
4141
});
4242
4343
~~~~~~~~~~
44-
<div foo={{this.foo}} bar={{this.baz}} ...attributes>
44+
<div foo={{this.foo}} baz={{this.bar}} ...attributes>
4545
foo
4646
</div>
4747
=========="

lib/transform.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,7 @@ function transform(source, template, options = {}) {
205205
if (elementId) {
206206
attrs.push(b.attr('id', b.text(elementId)));
207207
}
208-
attributeBindings.forEach((value, key) => {
208+
attributeBindings.forEach((key, value) => {
209209
attrs.push(b.attr(key, b.mustache(`this.${value}`)));
210210
});
211211
if (classNodes.length === 1) {

0 commit comments

Comments
 (0)