Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
saranya.r committed Jan 4, 2016
1 parent 9800176 commit deeb49b
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions packages/htmlbars-runtime/lib/hooks.js
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,12 @@ function yieldItem(template, env, parentScope, morph, renderState, visitor) {
currentMorph = morphList.firstChildMorph;
}

//Remove existing morph if the previous render doesn't yield multiple items
var morphToClear = renderState.morphToClear;
if(morphToClear) {
clearMorph(morphToClear, env, false);
}

// Advances the currentMorph pointer to the morph in the previously-rendered
// list that matches the yielded key. While doing so, it marks any morphs
// that it advances past as candidates for deletion. Assuming those morphs
Expand Down

0 comments on commit deeb49b

Please sign in to comment.