diff --git a/src/reconciler/hotReplacementRender.js b/src/reconciler/hotReplacementRender.js
index 9c578b70d..e532d8f91 100644
--- a/src/reconciler/hotReplacementRender.js
+++ b/src/reconciler/hotReplacementRender.js
@@ -215,7 +215,7 @@ const mergeInject = (a, b, instance) => {
const transformFlowNode = flow =>
flow.reduce((acc, node) => {
if (isFragmentNode(node) && node.props && node.props.children) {
- return [...acc, ...filterNullArray(node.props.children)]
+ return [...acc, ...filterNullArray(asArray(node.props.children))]
}
return [...acc, node]
}, [])
diff --git a/test/AppContainer.dev.test.js b/test/AppContainer.dev.test.js
index bb1cfd2f4..8a1192f4a 100644
--- a/test/AppContainer.dev.test.js
+++ b/test/AppContainer.dev.test.js
@@ -1871,6 +1871,69 @@ describe(`AppContainer (dev)`, () => {
expect(wrapper.update().text()).toBe('PATCHED + 6 v2')
})
+ it('hot-reloads children inside simple Fragments', () => {
+ if (React.version.startsWith('16')) {
+ const unmount = jest.fn()
+
+ class InnerComponent extends Component {
+ componentWillUnmount() {
+ unmount()
+ }
+
+ render() {
+ return internal
+ }
+ }
+ InnerComponent.displayName = 'InnerComponent'
+
+ const App = () => (
+