diff --git a/src/lib/render.js b/src/lib/render.js index 94ad647..a6a1ebe 100644 --- a/src/lib/render.js +++ b/src/lib/render.js @@ -23,7 +23,7 @@ module.exports = function (Component, props, targetDOMNode, callback) { var args = [].slice.call(arguments, 1); if (isRootContainer(type) && fetchedFragments.length) { - assign(props, fetchedFragments.pop()); + assign(props, fetchedFragments.shift()); } return originalCreateElement.apply(null, args); diff --git a/src/lib/renderToString.js b/src/lib/renderToString.js index 6a438c1..6780d7b 100644 --- a/src/lib/renderToString.js +++ b/src/lib/renderToString.js @@ -53,7 +53,7 @@ module.exports = function (Component, props) { var args = [].slice.call(arguments, 1); if (isRootContainer(type) && fetchedFragments.length) { - assign(props, fetchedFragments.pop()); + assign(props, fetchedFragments.shift()); } return originalCreateElement.apply(null, args);