Skip to content
This repository was archived by the owner on Apr 4, 2019. It is now read-only.

Conversation

@rwjblue
Copy link
Contributor

@rwjblue rwjblue commented Aug 2, 2015

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).

This is the fix for emberjs/ember.js#11949.

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`).
@rwjblue rwjblue force-pushed the fix-last-morph-duplicate-key branch from b83e3ad to 63c0a4a Compare August 2, 2015 18:28
mmun added a commit that referenced this pull request Aug 3, 2015
Fix issue with duplicate keys and last item.
@mmun mmun merged commit dc4bbf1 into tildeio:master Aug 3, 2015
@mmun mmun deleted the fix-last-morph-duplicate-key branch August 3, 2015 00:04
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants