mirror of
https://gitlab.com/openstapps/openstapps.git
synced 2025-12-11 08:46:16 +00:00
fix: id cards are wiped/replaced when an error happens in the pipe
This commit is contained in:
@@ -41,7 +41,7 @@ export class IdCardsProvider {
|
||||
mergeMap(user => this.fetchFallbackIdCards(user)),
|
||||
startWith([]),
|
||||
)
|
||||
: of([]).pipe(tap(() => this.encryptedStorageProvider.delete('id-cards'))),
|
||||
: of([]).pipe(tap({next: () => this.encryptedStorageProvider.delete('id-cards')})),
|
||||
),
|
||||
);
|
||||
}
|
||||
@@ -54,7 +54,7 @@ export class IdCardsProvider {
|
||||
},
|
||||
responseType: 'json',
|
||||
})
|
||||
.pipe(tap(idCards => this.encryptedStorageProvider.set('id-cards', idCards)));
|
||||
.pipe(tap({next: idCards => this.encryptedStorageProvider.set('id-cards', idCards)}));
|
||||
}
|
||||
|
||||
private fetchFallbackIdCards(user: SCUserConfiguration): Observable<SCIdCard[]> {
|
||||
|
||||
Reference in New Issue
Block a user