Skip to content

Commit

Permalink
fix(primaryProperty): infinite recursion when used with template cont…
Browse files Browse the repository at this point in the history
…roller
  • Loading branch information
jods4 committed Mar 19, 2017
1 parent fae7342 commit 5b5ed56
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/view-compiler.js
Expand Up @@ -293,6 +293,7 @@ export class ViewCompiler {
let attr;
let attrName;
let attrValue;
let originalAttrName;
let instruction;
let info;
let property;
Expand All @@ -319,7 +320,7 @@ export class ViewCompiler {

for (i = 0, ii = attributes.length; i < ii; ++i) {
attr = attributes[i];
attrName = attr.name;
originalAttrName = attrName = attr.name;
attrValue = attr.value;
info = bindingLanguage.inspectAttribute(resources, tagName, attrName, attrValue);

Expand Down Expand Up @@ -380,7 +381,7 @@ export class ViewCompiler {
this._configureProperties(instruction, resources);

if (type.liftsContent) { //template controller
instruction.originalAttrName = attrName;
instruction.originalAttrName = originalAttrName;
liftingInstruction = instruction;
break;
} else { //attached behavior
Expand All @@ -398,7 +399,7 @@ export class ViewCompiler {
instruction.attributes[resources.mapAttribute(attrName)] = attrValue;

if (type.liftsContent) { //template controller
instruction.originalAttrName = attrName;
instruction.originalAttrName = originalAttrName;
liftingInstruction = instruction;
break;
} else { //attached behavior
Expand Down

0 comments on commit 5b5ed56

Please sign in to comment.