File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -19,11 +19,11 @@ class GridState_Data
1919 */
2020 protected $ data ;
2121
22- protected GridState $ state ;
22+ protected ? GridState $ state ;
2323
2424 protected $ defaults = [];
2525
26- public function __construct ($ data = [], GridState $ state = null )
26+ public function __construct ($ data = [], ? GridState $ state = null )
2727 {
2828 $ this ->data = $ data ;
2929 $ this ->state = $ state ;
@@ -88,7 +88,7 @@ public function getData($name, $default = null)
8888 public function storeData ()
8989 {
9090 $ stateManager = $ this ->getStateManager ();
91- if (ClassInfo::hasMethod ($ stateManager , 'storeState ' )) {
91+ if (ClassInfo::hasMethod ($ stateManager , 'storeState ' ) && $ this -> state ) {
9292 $ stateManager ->storeState ($ this ->state ->getGridField (), $ this ->state ->Value ());
9393 }
9494 }
You can’t perform that action at this time.
0 commit comments