empty string not a name collision
authorJason Etheridge <phasefx@gmail.com>
Sun, 14 May 2023 01:39:54 +0000 (21:39 -0400)
committerJason Etheridge <phasefx@gmail.com>
Sun, 14 May 2023 13:04:51 +0000 (09:04 -0400)
Signed-off-by: Jason Etheridge <phasefx@gmail.com>
Open-ILS/src/eg2/src/app/share/grid/grid-manage-filters-dialog.component.ts

index b30f7d6..1234469 100644 (file)
@@ -57,13 +57,15 @@ export class GridManageFiltersDialogComponent extends DialogComponent implements
             .subscribe( newText => {
                 this.saveFilterName = newText;
                 this.nameCollision = false;
-                this.store.getItem('eg.grid.filters.' + this.gridContext.persistKey).then( setting => {
-                    if (setting) {
-                        if (setting[newText]) {
-                            this.nameCollision = true;
+                if (newText !== '') {
+                    this.store.getItem('eg.grid.filters.' + this.gridContext.persistKey).then( setting => {
+                        if (setting) {
+                            if (setting[newText]) {
+                                this.nameCollision = true;
+                            }
                         }
-                    }
-                });
+                    });
+                }
             })
         );