RED-3747: fix check multiple pages condition

This commit is contained in:
Dan Percic 2022-04-08 12:00:36 +03:00
parent f135d3be1d
commit 880d6996fe

View File

@ -95,7 +95,10 @@ export class ManualAnnotationDialogComponent extends BaseDialogComponent impleme
save() {
this._enhanceManualRedaction(this.data.manualRedactionEntryWrapper.manualRedactionEntry);
try {
const annotations = this.isRectangle ? this.#getRectangles() : [this.data.manualRedactionEntryWrapper];
const annotations =
this.isRectangle && !!this.form.get('multiplePages').value
? this.#getRectangles()
: [this.data.manualRedactionEntryWrapper];
this._dialogRef.close(annotations);
} catch (e) {
this._toaster.error(_('manual-annotation.dialog.error'));