File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -57,7 +57,9 @@ var CascadingPaneSubView = function (_React$Component) {
5757 cascSelect = _props . cascSelect ,
5858 getCascadingSubView = _props . getCascadingSubView ;
5959
60- if ( cascSelect ) getCascadingSubView ( cascSelect ) ;
60+ if ( getCascadingSubView ) {
61+ if ( cascSelect ) getCascadingSubView ( cascSelect ) ;
62+ }
6163 }
6264 } , {
6365 key : 'componentWillReceiveProps' ,
@@ -86,11 +88,15 @@ var CascadingPaneSubView = function (_React$Component) {
8688 if ( cascSelect ) {
8789 if ( ! nextProps . cascSelect || cascSelect !== nextProps . cascSelect ) {
8890 newState . navSelect = nextProps . cascSelect || '' ;
89- if ( nextProps . cascSelect ) getCascadingSubView ( nextProps . cascSelect ) ;
91+ if ( getCascadingSubView ) {
92+ if ( nextProps . cascSelect ) getCascadingSubView ( nextProps . cascSelect ) ;
93+ }
9094 }
9195 } else if ( nextProps . cascSelect ) {
9296 newState . navSelect = nextProps . cascSelect ;
93- getCascadingSubView ( nextProps . cascSelect ) ;
97+ if ( getCascadingSubView ) {
98+ getCascadingSubView ( nextProps . cascSelect ) ;
99+ }
94100 }
95101 if ( Object . keys ( newState ) . length > 0 ) {
96102 this . setState ( _extends ( { } , newState ) ) ;
Original file line number Diff line number Diff line change @@ -19,7 +19,9 @@ class CascadingPaneSubView extends React.Component {
1919
2020 componentWillMount ( ) {
2121 const { cascSelect, getCascadingSubView } = this . props ;
22- if ( cascSelect ) getCascadingSubView ( cascSelect ) ;
22+ if ( getCascadingSubView ) {
23+ if ( cascSelect ) getCascadingSubView ( cascSelect ) ;
24+ }
2325 }
2426
2527 componentWillReceiveProps ( nextProps ) {
@@ -47,11 +49,15 @@ class CascadingPaneSubView extends React.Component {
4749 if ( cascSelect ) {
4850 if ( ! nextProps . cascSelect || cascSelect !== nextProps . cascSelect ) {
4951 newState . navSelect = nextProps . cascSelect || '' ;
50- if ( nextProps . cascSelect ) getCascadingSubView ( nextProps . cascSelect ) ;
52+ if ( getCascadingSubView ) {
53+ if ( nextProps . cascSelect ) getCascadingSubView ( nextProps . cascSelect ) ;
54+ }
5155 }
5256 } else if ( nextProps . cascSelect ) {
5357 newState . navSelect = nextProps . cascSelect ;
54- getCascadingSubView ( nextProps . cascSelect ) ;
58+ if ( getCascadingSubView ) {
59+ getCascadingSubView ( nextProps . cascSelect ) ;
60+ }
5561 }
5662 if ( Object . keys ( newState ) . length > 0 ) {
5763 this . setState ( { ...newState } ) ;
You can’t perform that action at this time.
0 commit comments