Skip to content
This repository has been archived by the owner on Dec 16, 2021. It is now read-only.

bugfix: array[object] data children going to be an object #384

Merged
merged 2 commits into from
Jun 21, 2017

Conversation

src/index.js Outdated
@@ -500,7 +500,7 @@ function propsHook(props, context) {

// React annoyingly special-cases single children, and some react components are ridiculously strict about this.
let c = props.children;
if (c && Array.isArray(c) && c.length===1) {
if (c && Array.isArray(c) && c.length===1 && (typeof c[0] === 'string' || c[0] instanceof VNode)) {
Copy link
Member

@developit developit May 16, 2017

Choose a reason for hiding this comment

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

Need to also allow typeof c[0]==='function' here.

@developit developit merged commit ea1d3d3 into preactjs:master Jun 21, 2017
# for free to subscribe to this conversation on GitHub. Already have an account? #.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants