Merge pull request #916 from 4Science/CSTPER-66

Communities and collections not shown right after creation
This commit is contained in:
Tim Donohue
2020-11-19 14:52:46 -06:00
committed by GitHub
17 changed files with 328 additions and 82 deletions

View File

@@ -75,6 +75,10 @@ export const getSucceededRemoteWithNotEmptyData = () =>
<T>(source: Observable<RemoteData<T>>): Observable<RemoteData<T>> =>
source.pipe(find((rd: RemoteData<T>) => rd.hasSucceeded && isNotEmpty(rd.payload)));
export const getSucceededOrNoContentResponse = () =>
<T>(source: Observable<RemoteData<T>>): Observable<RemoteData<T>> =>
source.pipe(find((rd: RemoteData<T>) => rd.hasSucceeded || rd.hasNoContent));
/**
* Get the first successful remotely retrieved object
*