Skip to content

Commit

Permalink
fix(view-compiler): properly handle content process skip
Browse files Browse the repository at this point in the history
  • Loading branch information
EisenbergEffect committed Jul 30, 2015
1 parent a453dd9 commit 014185e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions src/html-behavior.js
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,8 @@ export class HtmlBehaviorResource {
var partReplacements = instruction.partReplacements = {};

if(this.processContent(compiler, resources, node, instruction) && node.hasChildNodes()){
instruction.skipContentProcessing = false;

if(!this.usesShadowDOM){
var fragment = document.createDocumentFragment(),
currentChild = node.firstChild,
Expand Down Expand Up @@ -220,6 +222,8 @@ export class HtmlBehaviorResource {
currentChild = nextSibling;
}
}
}else{
instruction.skipContentProcessing = true;
}
}

Expand Down
2 changes: 1 addition & 1 deletion src/view-compiler.js
Original file line number Diff line number Diff line change
Expand Up @@ -391,7 +391,7 @@ export class ViewCompiler {
};
}

if(elementInstruction && elementInstruction.type.skipContentProcessing){
if(elementInstruction && elementInstruction.skipContentProcessing){
return node.nextSibling;
}

Expand Down

0 comments on commit 014185e

Please sign in to comment.