File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -194,7 +194,11 @@ var IsotopeGrid = function (_React$Component) {
194194 }
195195
196196 if ( reload !== this . state . reload ) this . setState ( { reload : reload } ) ;
197- if ( options ) this . state . isotope . arrange ( _extends ( { } , options ) ) ;
197+ if ( options && this . state . isotope ) {
198+ this . state . isotope . arrange ( _extends ( { } , options ) ) ;
199+ } else if ( options ) {
200+ this . createIsotope ( ) ;
201+ }
198202 }
199203 } , {
200204 key : 'shouldComponentUpdate' ,
Original file line number Diff line number Diff line change @@ -146,7 +146,11 @@ class IsotopeGrid extends React.Component {
146146 }
147147
148148 if ( reload !== this . state . reload ) this . setState ( { reload } ) ;
149- if ( options ) this . state . isotope . arrange ( { ...options } ) ;
149+ if ( options && this . state . isotope ) {
150+ this . state . isotope . arrange ( { ...options } ) ;
151+ } else if ( options ) {
152+ this . createIsotope ( ) ;
153+ }
150154 }
151155
152156 shouldComponentUpdate ( nextProps , nextState ) {
You can’t perform that action at this time.
0 commit comments