File tree Expand file tree Collapse file tree 3 files changed +122
-133
lines changed Expand file tree Collapse file tree 3 files changed +122
-133
lines changed Original file line number Diff line number Diff line change 55- Fix: ensure ` client ` option can be used with mutation query [ #1145 ] ( https://github.com/apollographql/react-apollo/pull/1145 )
66
77- Made ` OptionProps.data ` 's ` TResult ` partial [ #1231 ] ( https://github.com/apollographql/react-apollo/pull/1231 )
8-
8+ - Support arrays being returned from render in SSR [ # 1158 ] ( https://github.com/apollographql/react-apollo/pull/1158 )
99
1010### 1.4.16
1111- upgrade to react-16
Original file line number Diff line number Diff line change @@ -37,6 +37,12 @@ export function walkTree(
3737 context : Context ,
3838 ) => boolean | void ,
3939) {
40+ // elements can now be arrays (react@16)
41+ if ( Array . isArray ( element ) ) {
42+ element . forEach ( item => walkTree ( item , context , visitor ) ) ;
43+ return ;
44+ }
45+
4046 const Component = element . type ;
4147 // a stateless functional component or a class
4248 if ( typeof Component === 'function' ) {
@@ -90,7 +96,11 @@ export function walkTree(
9096 }
9197
9298 if ( child ) {
93- walkTree ( child , childContext , visitor ) ;
99+ if ( Array . isArray ( child ) ) {
100+ child . forEach ( item => walkTree ( item , context , visitor ) ) ;
101+ } else {
102+ walkTree ( child , childContext , visitor ) ;
103+ }
94104 }
95105 } else {
96106 // a basic string or dom element, just get children
You can’t perform that action at this time.
0 commit comments