@@ -16,9 +16,9 @@ return /******/ (function(modules) { // webpackBootstrap
1616/******/ function __webpack_require__ ( moduleId ) {
1717/******/
1818/******/ // Check if module is in cache
19- /******/ if ( installedModules [ moduleId ] )
19+ /******/ if ( installedModules [ moduleId ] ) {
2020/******/ return installedModules [ moduleId ] . exports ;
21- /******/
21+ /******/ }
2222/******/ // Create a new module (and put it into the cache)
2323/******/ var module = installedModules [ moduleId ] = {
2424/******/ i : moduleId ,
@@ -43,9 +43,6 @@ return /******/ (function(modules) { // webpackBootstrap
4343/******/ // expose the module cache
4444/******/ __webpack_require__ . c = installedModules ;
4545/******/
46- /******/ // identity function for calling harmony imports with the correct context
47- /******/ __webpack_require__ . i = function ( value ) { return value ; } ;
48- /******/
4946/******/ // define getter function for harmony exports
5047/******/ __webpack_require__ . d = function ( exports , name , getter ) {
5148/******/ if ( ! __webpack_require__ . o ( exports , name ) ) {
@@ -73,7 +70,7 @@ return /******/ (function(modules) { // webpackBootstrap
7370/******/ __webpack_require__ . p = "" ;
7471/******/
7572/******/ // Load entry module and return exports
76- /******/ return __webpack_require__ ( __webpack_require__ . s = 1 ) ;
73+ /******/ return __webpack_require__ ( __webpack_require__ . s = 0 ) ;
7774/******/ } )
7875/************************************************************************/
7976/******/ ( [
@@ -83,6 +80,35 @@ return /******/ (function(modules) { // webpackBootstrap
8380"use strict" ;
8481
8582
83+ Object . defineProperty ( exports , "__esModule" , {
84+ value : true
85+ } ) ;
86+ exports . default = asyncBootstrapper ;
87+
88+ var _reactTreeWalker = __webpack_require__ ( 1 ) ;
89+
90+ var _reactTreeWalker2 = _interopRequireDefault ( _reactTreeWalker ) ;
91+
92+ function _interopRequireDefault ( obj ) { return obj && obj . __esModule ? obj : { default : obj } ; }
93+
94+ function asyncBootstrapper ( app , options ) {
95+ var visitor = function visitor ( element , instance ) {
96+ if ( instance && typeof instance . asyncBootstrap === 'function' ) {
97+ return instance . asyncBootstrap ( ) ;
98+ }
99+ return true ;
100+ } ;
101+
102+ return ( 0 , _reactTreeWalker2 . default ) ( app , visitor , { } , options ) ;
103+ }
104+
105+ /***/ } ) ,
106+ /* 1 */
107+ /***/ ( function ( module , exports , __webpack_require__ ) {
108+
109+ "use strict" ;
110+
111+
86112Object . defineProperty ( exports , "__esModule" , {
87113 value : true
88114} ) ;
@@ -93,11 +119,10 @@ var _react = __webpack_require__(2);
93119
94120var defaultOptions = {
95121 componentWillUnmount : false
96- } ;
97122
98- // Lifted from https://github.com/sindresorhus/p-reduce
99- // Thanks @sindresorhus !
100- /* eslint-disable no-console */
123+ // Lifted from https://github.com/sindresorhus/p-reduce
124+ // Thanks @sindresorhus !
125+ } ; /* eslint-disable no-console */
101126
102127// Inspired by the awesome work done by the Apollo team.
103128// See https://github.com/apollostack/react-apollo/blob/master/src/server.ts
@@ -152,7 +177,7 @@ function reactTreeWalker(element, visitor, context) {
152177 var options = arguments . length > 3 && arguments [ 3 ] !== undefined ? arguments [ 3 ] : defaultOptions ;
153178
154179 return new Promise ( function ( resolve ) {
155- var doVisit = function doVisit ( getChildren , visitorResult , childContext , isChildren ) {
180+ var doVisit = function doVisit ( getChildren , visitorResult , childContext ) {
156181 var doTraverse = function doTraverse ( shouldContinue ) {
157182 if ( ! shouldContinue ) {
158183 // We recieved a false, which indicates a desire to stop traversal.
@@ -165,19 +190,19 @@ function reactTreeWalker(element, visitor, context) {
165190 if ( child == null ) {
166191 // If no children then we can't traverse. We've reached the leaf.
167192 resolve ( ) ;
168- } else if ( isChildren ) {
193+ } else if ( _react . Children . count ( child ) ) {
169194 // If its a react Children collection we need to breadth-first
170195 // traverse each of them.
171196 var mapper = function mapper ( aChild ) {
172- return aChild ? reactTreeWalker ( aChild , visitor , theChildContext ) : undefined ;
197+ return aChild ? reactTreeWalker ( aChild , visitor , theChildContext , options ) : undefined ;
173198 } ;
174199 // pMapSeries allows us to do depth-first traversal. Thanks @sindresorhus!
175200 pMapSeries ( _react . Children . map ( child , function ( cur ) {
176201 return cur ;
177202 } ) , mapper ) . then ( resolve ) ;
178203 } else {
179204 // Otherwise we pass the individual child to the next recursion.
180- reactTreeWalker ( child , visitor , theChildContext ) . then ( resolve ) ;
205+ reactTreeWalker ( child , visitor , theChildContext , options ) . then ( resolve ) ;
181206 }
182207 } ;
183208
@@ -261,7 +286,7 @@ function reactTreeWalker(element, visitor, context) {
261286 // This must be a basic element, such as a string or dom node.
262287 doVisit ( function ( ) {
263288 return element . props && element . props . children ? element . props . children : undefined ;
264- } , visitor ( element , null , context ) , context , true ) ;
289+ } , visitor ( element , null , context ) , context ) ;
265290 }
266291 } ) . catch ( function ( err ) {
267292 // We don't want errors to be swallowed!
@@ -270,35 +295,6 @@ function reactTreeWalker(element, visitor, context) {
270295 } ) ;
271296}
272297
273- /***/ } ) ,
274- /* 1 */
275- /***/ ( function ( module , exports , __webpack_require__ ) {
276-
277- "use strict" ;
278-
279-
280- Object . defineProperty ( exports , "__esModule" , {
281- value : true
282- } ) ;
283- exports . default = asyncBootstrapper ;
284-
285- var _reactTreeWalker = __webpack_require__ ( 0 ) ;
286-
287- var _reactTreeWalker2 = _interopRequireDefault ( _reactTreeWalker ) ;
288-
289- function _interopRequireDefault ( obj ) { return obj && obj . __esModule ? obj : { default : obj } ; }
290-
291- function asyncBootstrapper ( app , options ) {
292- var visitor = function visitor ( element , instance ) {
293- if ( instance && typeof instance . asyncBootstrap === 'function' ) {
294- return instance . asyncBootstrap ( ) ;
295- }
296- return true ;
297- } ;
298-
299- return ( 0 , _reactTreeWalker2 . default ) ( app , visitor , { } , options ) ;
300- }
301-
302298/***/ } ) ,
303299/* 2 */
304300/***/ ( function ( module , exports ) {
0 commit comments