77 exports [ "ReactTreeWalker" ] = factory ( require ( "react" ) ) ;
88 else
99 root [ "ReactTreeWalker" ] = factory ( root [ "React" ] ) ;
10- } ) ( this , function ( __WEBPACK_EXTERNAL_MODULE_0__ ) {
10+ } ) ( this , function ( __WEBPACK_EXTERNAL_MODULE_1__ ) {
1111return /******/ ( function ( modules ) { // webpackBootstrap
1212/******/ // The module cache
1313/******/ var installedModules = { } ;
@@ -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,17 +70,11 @@ 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/******/ ( [
8077/* 0 */
81- /***/ ( function ( module , exports ) {
82-
83- module . exports = __WEBPACK_EXTERNAL_MODULE_0__ ;
84-
85- /***/ } ) ,
86- /* 1 */
8778/***/ ( function ( module , exports , __webpack_require__ ) {
8879
8980"use strict" ;
@@ -95,7 +86,7 @@ Object.defineProperty(exports, "__esModule", {
9586exports . isPromise = undefined ;
9687exports . default = reactTreeWalker ;
9788
98- var _react = __webpack_require__ ( 0 ) ;
89+ var _react = __webpack_require__ ( 1 ) ;
9990
10091var defaultOptions = {
10192 componentWillUnmount : false
@@ -170,7 +161,7 @@ function reactTreeWalker(element, visitor, context) {
170161 if ( child == null ) {
171162 // If no children then we can't traverse. We've reached the leaf.
172163 resolve ( ) ;
173- } else if ( isChildren ) {
164+ } else if ( isChildren || _react . Children . count ( child ) ) {
174165 // If its a react Children collection we need to breadth-first
175166 // traverse each of them.
176167 var mapper = function mapper ( aChild ) {
@@ -209,10 +200,10 @@ function reactTreeWalker(element, visitor, context) {
209200 // Is this element a Component?
210201 if ( typeof element . type === 'function' ) {
211202 var Component = element . type ;
212- var props = Object . assign ( { } , Component . defaultProps , element . props
203+ var props = Object . assign ( { } , Component . defaultProps , element . props ) ;
213204
214205 // Is this a class component? (http://bit.ly/2j9Ifk3)
215- ) ; var isReactClassComponent = Component . prototype && ( Component . prototype . isReactComponent || Component . prototype . isPureReactComponent ) ;
206+ var isReactClassComponent = Component . prototype && ( Component . prototype . isReactComponent || Component . prototype . isPureReactComponent ) ;
216207
217208 if ( isReactClassComponent ) {
218209 // React class component
@@ -275,6 +266,12 @@ function reactTreeWalker(element, visitor, context) {
275266 } ) ;
276267}
277268
269+ /***/ } ) ,
270+ /* 1 */
271+ /***/ ( function ( module , exports ) {
272+
273+ module . exports = __WEBPACK_EXTERNAL_MODULE_1__ ;
274+
278275/***/ } )
279276/******/ ] ) ;
280277} ) ;
0 commit comments