Permalink
Browse files

fix(view-compiler): use attribute name

fixes #575
  • Loading branch information...
StrahilKazlachev authored and jdanyow committed Nov 13, 2017
1 parent 5a14b86 commit 5a2276c230ef149805b73477084cb270d970e628
Showing with 2 additions and 2 deletions.
  1. +2 −2 src/view-compiler.js
View
@@ -206,7 +206,7 @@ export class ViewCompiler {
// (otherwise it will remain associated with "value")
if (info.command && (info.command !== 'options') && type.primaryProperty) {
const primaryProperty = type.primaryProperty;
attrName = info.attrName = primaryProperty.name;
attrName = info.attrName = primaryProperty.attribute;
// note that the defaultBindingMode always overrides the attribute bindingMode which is only used for "single-value" custom attributes
// when using the syntax `<div square.bind="color"></div>`
info.defaultBindingMode = primaryProperty.defaultBindingMode;
@@ -351,7 +351,7 @@ export class ViewCompiler {
// (otherwise it will remain associated with "value")
if (info.command && (info.command !== 'options') && type.primaryProperty) {
const primaryProperty = type.primaryProperty;
attrName = info.attrName = primaryProperty.name;
attrName = info.attrName = primaryProperty.attribute;
// note that the defaultBindingMode always overrides the attribute bindingMode which is only used for "single-value" custom attributes
// when using the syntax `<div square.bind="color"></div>`
info.defaultBindingMode = primaryProperty.defaultBindingMode;

0 comments on commit 5a2276c

Please sign in to comment.