We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 08027bb commit ca167a2Copy full SHA for ca167a2
1 file changed
src/app/notifications/suggestions.service.ts
@@ -38,6 +38,7 @@ import {
38
import { WorkspaceItem } from '../core/submission/models/workspaceitem.model';
39
import { WorkspaceitemDataService } from '../core/submission/workspaceitem-data.service';
40
import {
41
+ hasNoValue,
42
hasValue,
43
isNotEmpty,
44
} from '../shared/empty.util';
@@ -165,6 +166,9 @@ export class SuggestionsService {
165
166
* The EPerson id for which to retrieve suggestion targets
167
*/
168
public retrieveCurrentUserSuggestions(userUuid: string): Observable<SuggestionTarget[]> {
169
+ if (hasNoValue(userUuid)) {
170
+ return of([]);
171
+ }
172
return this.researcherProfileService.findById(userUuid, true).pipe(
173
getFirstCompletedRemoteData(),
174
mergeMap((profile: RemoteData<ResearcherProfile> ) => {
0 commit comments