File tree Expand file tree Collapse file tree 1 file changed +6
-5
lines changed
src/app/shared/dia-backend/asset/refreshing Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Original file line number Diff line number Diff line change 11import { HttpErrorResponse } from '@angular/common/http' ;
22import { Injectable } from '@angular/core' ;
33import { UntilDestroy , untilDestroyed } from '@ngneat/until-destroy' ;
4- import { EMPTY , forkJoin } from 'rxjs' ;
4+ import { EMPTY , forkJoin , of } from 'rxjs' ;
55import { catchError , concatMap , first } from 'rxjs/operators' ;
66import { HttpErrorCode } from '../../../error/error.service' ;
77import { ProofRepository } from '../../../repositories/proof/proof-repository.service' ;
@@ -34,8 +34,9 @@ export class DiaBackendAsseRefreshingService {
3434 }
3535 return this . proofRepository . all$ . pipe (
3636 first ( ) ,
37- concatMap ( proofs =>
38- forkJoin (
37+ concatMap ( proofs => {
38+ if ( proofs . length === 0 ) return of ( [ ] ) ;
39+ return forkJoin (
3940 proofs . map ( proof =>
4041 this . assetRepository . fetchByProof$ ( proof ) . pipe (
4142 catchError ( ( err : unknown ) => {
@@ -49,8 +50,8 @@ export class DiaBackendAsseRefreshingService {
4950 } )
5051 )
5152 )
52- )
53- ) ,
53+ ) ;
54+ } ) ,
5455 concatMap ( ( ) => this . diaBackendAssetPrefetchingService . prefetch ( ) )
5556 ) ;
5657 }
You can’t perform that action at this time.
0 commit comments