From 7b8602a9b06f986a8c1368a899dd74abd1863ed2 Mon Sep 17 00:00:00 2001 From: Valentin Mihai Date: Wed, 10 Apr 2024 12:51:51 +0300 Subject: [PATCH] RED-8711 - check for positions property to be sure it exists and is not null --- apps/red-ui/src/app/services/files/redaction-log.service.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/red-ui/src/app/services/files/redaction-log.service.ts b/apps/red-ui/src/app/services/files/redaction-log.service.ts index c61509628..37b87c76f 100644 --- a/apps/red-ui/src/app/services/files/redaction-log.service.ts +++ b/apps/red-ui/src/app/services/files/redaction-log.service.ts @@ -33,7 +33,7 @@ export class RedactionLogService extends GenericService { #filterInvalidEntries(redactionLogEntry: IRedactionLogEntry[]) { return redactionLogEntry.filter(entry => { - entry.positions = entry.positions.filter(p => !p.rectangle || !!p.rectangle?.length); + entry.positions = entry.positions?.filter(p => !p.rectangle || !!p.rectangle?.length); const hasPositions = !!entry.positions?.length; if (!hasPositions) { this.#toaster.devInfo(`Entry ${entry.id} was skipped because it has no position`);