From 758fecb94cc8aabac657c4ff8ff967dc37316b5b Mon Sep 17 00:00:00 2001 From: Dan Percic Date: Wed, 24 May 2023 10:58:27 +0300 Subject: [PATCH] RED-6813: check for undefined --- apps/red-ui/src/app/models/file/annotation.wrapper.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/red-ui/src/app/models/file/annotation.wrapper.ts b/apps/red-ui/src/app/models/file/annotation.wrapper.ts index f89bb5bc1..5ec1dbdc8 100644 --- a/apps/red-ui/src/app/models/file/annotation.wrapper.ts +++ b/apps/red-ui/src/app/models/file/annotation.wrapper.ts @@ -361,7 +361,7 @@ export class AnnotationWrapper implements IListable, Record { const viableChanges = redactionLogEntryWrapper.changes.filter(c => c.analysisNumber > 1); const lastChange = viableChanges.sort(chronologicallyBy(x => x.dateTime)).at(-1); const lastChangeOccurredAfterLastManualChange = - timestampOf(lastChange.dateTime) > timestampOf(lastRelevantManualChange.processedDate); + lastChange && timestampOf(lastChange.dateTime) > timestampOf(lastRelevantManualChange.processedDate); if (lastChangeOccurredAfterLastManualChange && lastChange.type === ChangeTypes.ADDED && redactionLogEntryWrapper.redacted) { annotationWrapper.superType = SuperTypes.Redaction;