File tree Expand file tree Collapse file tree 1 file changed +8
-5
lines changed Expand file tree Collapse file tree 1 file changed +8
-5
lines changed Original file line number Diff line number Diff line change @@ -115,7 +115,9 @@ class Storage extends React.Component {
115115 filter : FILTER_OPTIONS [ visibleEntities ] ,
116116 type : storageType ,
117117 } ) ;
118+ } ;
118119
120+ const restartAutorefresh = ( ) => {
119121 this . autofetcher . stop ( ) ;
120122 this . autofetcher . start ( ) ;
121123 this . autofetcher . fetch ( ( ) =>
@@ -131,14 +133,15 @@ class Storage extends React.Component {
131133 }
132134 if ( database && autorefresh && ! prevProps . autorefresh ) {
133135 startFetch ( ) ;
136+ restartAutorefresh ( ) ;
134137 }
135138
136- if (
137- ( storageType !== prevProps . storageType ||
138- visibleEntities !== prevProps . visibleEntities ) &&
139- ( ! database || ( database && autorefresh ) )
140- ) {
139+ if ( storageType !== prevProps . storageType || visibleEntities !== prevProps . visibleEntities ) {
141140 startFetch ( ) ;
141+
142+ if ( ! database || ( database && autorefresh ) ) {
143+ restartAutorefresh ( ) ;
144+ }
142145 }
143146 }
144147
You can’t perform that action at this time.
0 commit comments