File tree 1 file changed +8
-5
lines changed
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 {
115
115
filter : FILTER_OPTIONS [ visibleEntities ] ,
116
116
type : storageType ,
117
117
} ) ;
118
+ } ;
118
119
120
+ const restartAutorefresh = ( ) => {
119
121
this . autofetcher . stop ( ) ;
120
122
this . autofetcher . start ( ) ;
121
123
this . autofetcher . fetch ( ( ) =>
@@ -131,14 +133,15 @@ class Storage extends React.Component {
131
133
}
132
134
if ( database && autorefresh && ! prevProps . autorefresh ) {
133
135
startFetch ( ) ;
136
+ restartAutorefresh ( ) ;
134
137
}
135
138
136
- if (
137
- ( storageType !== prevProps . storageType ||
138
- visibleEntities !== prevProps . visibleEntities ) &&
139
- ( ! database || ( database && autorefresh ) )
140
- ) {
139
+ if ( storageType !== prevProps . storageType || visibleEntities !== prevProps . visibleEntities ) {
141
140
startFetch ( ) ;
141
+
142
+ if ( ! database || ( database && autorefresh ) ) {
143
+ restartAutorefresh ( ) ;
144
+ }
142
145
}
143
146
}
144
147
You can’t perform that action at this time.
0 commit comments