From 68abbacc3954ca088d3bdea4e45789079c4f8069 Mon Sep 17 00:00:00 2001 From: Sebastian Markbage Date: Mon, 7 Oct 2013 14:53:20 -0700 Subject: [PATCH] Expose the rendered children before they're actually mounted Exposing the _renderedChildren property before all the children are fully mounted. This allows us to debug a partially mounted tree when the debugger has a breakpoint in the one of the mounting children. This only has a functional difference in the case where mounting throws. This will end up not mounting the component anyway. Any remounting shouldn't be affected by this change. --- src/core/ReactMultiChild.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/ReactMultiChild.js b/src/core/ReactMultiChild.js index 501baa21ca..6bfe277bd6 100644 --- a/src/core/ReactMultiChild.js +++ b/src/core/ReactMultiChild.js @@ -197,6 +197,7 @@ var ReactMultiChild = { mountChildren: function(children, transaction) { var mountImages = []; var index = 0; + this._renderedChildren = children; for (var name in children) { var child = children[name]; if (children.hasOwnProperty(name) && child) { @@ -213,7 +214,6 @@ var ReactMultiChild = { index++; } } - this._renderedChildren = children; return mountImages; },