Skip to content

Commit c1bd65e

Browse files
127655: avoid nullpointer
1 parent 0dabc8e commit c1bd65e

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/app/core/submission/submission-rest.service.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import { Observable, skipWhile } from 'rxjs';
44
import { distinctUntilChanged, filter, map, mergeMap, switchMap, tap } from 'rxjs/operators';
55

66
import { RequestService } from '../data/request.service';
7-
import { hasValue, isNotEmpty } from '../../shared/empty.util';
7+
import { hasValue, hasValueOperator, isNotEmpty } from '../../shared/empty.util';
88
import {
99
DeleteRequest,
1010
PostRequest,
@@ -128,7 +128,8 @@ export class SubmissionRestService {
128128
this.sendGetDataRequest(endpointURL, useCachedVersionIfAvailable);
129129
const startTime: number = new Date().getTime();
130130
return this.requestService.getByHref(endpointURL).pipe(
131-
map((requestEntry) => requestEntry.request.uuid),
131+
map((requestEntry) => requestEntry?.request?.uuid),
132+
hasValueOperator(),
132133
distinctUntilChanged(),
133134
switchMap((requestId) => this.rdbService.buildFromRequestUUID<SubmissionResponse>(requestId)),
134135
// This skip ensures that if a stale object is present in the cache when you do a

0 commit comments

Comments
 (0)