RED-8711 - filtered out entities with empty rectangle positions

This commit is contained in:
Valentin Mihai 2024-04-09 13:11:42 +03:00
parent 1587c9c84a
commit 09aa5eac60
2 changed files with 2 additions and 0 deletions

View File

@ -33,6 +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);
const hasPositions = !!entry.positions?.length;
if (!hasPositions) {
this.#toaster.devInfo(`Entry ${entry.id} was skipped because it has no position`);

View File

@ -2,4 +2,5 @@ import { ICellRectangle } from './cell-rectangle';
export interface IRectangle extends ICellRectangle {
page?: number;
rectangle?: [];
}