RED-8711 - check for positions property to be sure it exists and is not null
This commit is contained in:
parent
09aa5eac60
commit
7b8602a9b0
@ -33,7 +33,7 @@ export class RedactionLogService extends GenericService<unknown> {
|
||||
|
||||
#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`);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user