Skip to content

Commit

Permalink
fix(vdom): functional components can accept any children
Browse files Browse the repository at this point in the history
fixes #2007
fixes #1969
  • Loading branch information
manucorporat committed Dec 18, 2019
1 parent e056a87 commit 93081f5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/runtime/vdom/h.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ export const h = (nodeName: any, vnodeData: any, ...children: d.ChildType[]): d.
if (simple = typeof nodeName !== 'function' && !isComplexType(child)) {
child = String(child);

} else if (BUILD.isDev && child.$flags$ === undefined) {
} else if (BUILD.isDev && typeof nodeName !== 'function' && child.$flags$ === undefined) {
consoleDevError(`vNode passed as children has unexpected type.
Make sure it's using the correct h() function.
Empty objects can also be the cause, look for JSX comments that became objects.`);
Expand Down

0 comments on commit 93081f5

Please sign in to comment.