File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -121,6 +121,7 @@ export default function JobsSelector(props: JobSelectorPropsType) {
121121 if ( fetchedJobCollections . length > 0 && ! forceFetch ) {
122122 console . info ( "Job collections already fetched, skipping fetch." ) ;
123123 setJobCollections ( fetchedJobCollections ) ;
124+ setLoading ( false ) ;
124125 return ;
125126 }
126127
@@ -135,6 +136,7 @@ export default function JobsSelector(props: JobSelectorPropsType) {
135136 if ( equalJC ) {
136137 console . info ( "Job collections already fetched, skipping fetch." ) ;
137138 setJobCollections ( fetchedJobCollections ) ;
139+ setLoading ( false ) ;
138140 return ;
139141 }
140142
@@ -287,7 +289,8 @@ export default function JobsSelector(props: JobSelectorPropsType) {
287289
288290 useEffect ( ( ) => {
289291 console . info ( "useEffect in JobsSelector triggered" ) ;
290- if ( selectedFunction !== undefined && jobCollections . length > 0 ) {
292+ if ( selectedFunction === undefined || jobCollections . length > 0 ) {
293+ } else {
291294 console . info ( "Function selected: " , selectedFunction . uid ) ;
292295 ( async ( ) => {
293296 setJobCollections ( [ ] ) ;
You can’t perform that action at this time.
0 commit comments