Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Components Inside an Each Added to View Tree #428

Merged
merged 2 commits into from
Aug 1, 2015
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 15 additions & 1 deletion ember_debug/view-debug.js
Original file line number Diff line number Diff line change
Expand Up @@ -620,7 +620,7 @@ export default EmberObject.extend(PortMixin, {
* @param {Array} children
*/
_appendNodeChildren(renderNode, children) {
let childNodes = renderNode.childNodes;
let childNodes = this._childrenForNode(renderNode);
if (!childNodes) { return; }
childNodes.forEach(childNode => {
if (this._shouldShowNode(childNode, renderNode)) {
Expand All @@ -633,6 +633,20 @@ export default EmberObject.extend(PortMixin, {
});
},

/**
* Gather the children assigned to the render node.
*
* @param {Object} renderNode
* @return {Array} children
*/
_childrenForNode(renderNode) {
if (!!renderNode.morphMap) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is causing the linting failure (and subsequently the CI failure). Changing to:

if (renderNode.morphMap) { }

Should fix.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch, thanks!

return keys(renderNode.morphMap).map(key => renderNode.morphMap[key]);
} else {
return renderNode.childNodes;
}
},

/**
* Whether a render node is elligible to be included
* in the tree.
Expand Down