We are using renderState.handledMorphs as a way to know if a given key is duplicated or not (if it is duplicated we use a binning strategy to prevent errors), but we were setting handleMorphs[key] to null when the given morph was the last item in the list.
The fix is to keep renderAndCleanup and yieldItem using the same mechanism to know of the handled morphs (both should check via key in handledMorphs).
We are using
renderState.handledMorphs
as a way to know if a given key is duplicated or not (if it is duplicated we use a binning strategy to prevent errors), but we were settinghandleMorphs[key]
tonull
when the given morph was the last item in the list.The fix is to keep
renderAndCleanup
andyieldItem
using the same mechanism to know of the handled morphs (both should check viakey in handledMorphs
).This is the fix for https://github.com/emberjs/ember.js/pull/11949.