mono part merge dialog
authorBill Erickson <berickxx@gmail.com>
Fri, 30 Nov 2018 16:31:36 +0000 (11:31 -0500)
committerBill Erickson <berickxx@gmail.com>
Fri, 30 Nov 2018 16:34:20 +0000 (11:34 -0500)
Signed-off-by: Bill Erickson <berickxx@gmail.com>
Open-ILS/src/eg2/src/app/staff/catalog/record/part-merge-dialog.component.ts

index de0bbc5..27c4d30 100644 (file)
@@ -50,8 +50,12 @@ export class PartMergeDialogComponent extends DialogComponent {
             ()  => {
                 // 2. Delete the now-empty subordinate parts.  Note the
                 // delete must come after the part map changes are committed.
-                this.pcrud.autoApply(maps)
-                    .toPromise().then(() => this.deleteParts());
+                if (maps.length > 0) {
+                    this.pcrud.autoApply(maps)
+                        .toPromise().then(() => this.deleteParts());
+                } else {
+                    this.deleteParts();
+                }
             }
         );
     }