File tree 1 file changed +5
-2
lines changed
public/pages/DetectorDetail/containers
1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -161,7 +161,10 @@ export const DetectorDetail = (props: DetectorDetailProps) => {
161
161
core . notifications . toasts . addDanger ( 'Error getting all indices' ) ;
162
162
} ) ;
163
163
} ;
164
- getInitialIndices ( ) ;
164
+ // only need to check if indices exist after detector finishes loading
165
+ if ( ! isLoadingDetector ) {
166
+ getInitialIndices ( ) ;
167
+ }
165
168
} , [ detector ] ) ;
166
169
167
170
useEffect ( ( ) => {
@@ -188,7 +191,7 @@ export const DetectorDetail = (props: DetectorDetailProps) => {
188
191
// If the detector state was changed after opening the stop detector modal,
189
192
// re-check if any jobs are running, and close the modal if it's not needed anymore
190
193
useEffect ( ( ) => {
191
- if ( ! isRTJobRunning && ! isHistoricalJobRunning ) {
194
+ if ( ! isRTJobRunning && ! isHistoricalJobRunning && ! isEmpty ( detector ) ) {
192
195
hideStopDetectorModal ( ) ;
193
196
}
194
197
} , [ detector ] ) ;
You can’t perform that action at this time.
0 commit comments