diff --git a/src/diff/index.js b/src/diff/index.js index 14b92f6e9c8..361043ebda9 100644 --- a/src/diff/index.js +++ b/src/diff/index.js @@ -5,6 +5,7 @@ import { diffChildren } from './children'; import { diffProps } from './props'; import { assign, removeNode } from '../util'; import options from '../options'; +import { toChildArray } from '..'; /** * Diff two virtual nodes and apply proper changes to the DOM @@ -165,7 +166,9 @@ export function diff( tmp = c.render(c.props, c.state, c.context); let isTopLevelFragment = tmp != null && tmp.type == Fragment && tmp.key == null; - newVNode._children = isTopLevelFragment ? tmp.props.children : tmp; + newVNode._children = toChildArray( + isTopLevelFragment ? tmp.props.children : tmp + ); if (c.getChildContext != null) { context = assign(assign({}, context), c.getChildContext());