RED-6813: check for undefined
This commit is contained in:
parent
24ff24cfcb
commit
758fecb94c
@ -361,7 +361,7 @@ export class AnnotationWrapper implements IListable, Record<string, unknown> {
|
|||||||
const viableChanges = redactionLogEntryWrapper.changes.filter(c => c.analysisNumber > 1);
|
const viableChanges = redactionLogEntryWrapper.changes.filter(c => c.analysisNumber > 1);
|
||||||
const lastChange = viableChanges.sort(chronologicallyBy(x => x.dateTime)).at(-1);
|
const lastChange = viableChanges.sort(chronologicallyBy(x => x.dateTime)).at(-1);
|
||||||
const lastChangeOccurredAfterLastManualChange =
|
const lastChangeOccurredAfterLastManualChange =
|
||||||
timestampOf(lastChange.dateTime) > timestampOf(lastRelevantManualChange.processedDate);
|
lastChange && timestampOf(lastChange.dateTime) > timestampOf(lastRelevantManualChange.processedDate);
|
||||||
|
|
||||||
if (lastChangeOccurredAfterLastManualChange && lastChange.type === ChangeTypes.ADDED && redactionLogEntryWrapper.redacted) {
|
if (lastChangeOccurredAfterLastManualChange && lastChange.type === ChangeTypes.ADDED && redactionLogEntryWrapper.redacted) {
|
||||||
annotationWrapper.superType = SuperTypes.Redaction;
|
annotationWrapper.superType = SuperTypes.Redaction;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user