LP#1844169: Compare query position against string
authorKyle Huckins <khuckins@catalyte.io>
Wed, 17 Mar 2021 19:48:44 +0000 (19:48 +0000)
committerGalen Charlton <gmc@equinoxOLI.org>
Mon, 12 Jul 2021 15:08:36 +0000 (11:08 -0400)
Compare queryPosition against '0' rather than int 0, avoiding Angular
issues during build process

Signed-off-by: Kyle Huckins <khuckins@catalyte.io>
Signed-off-by: Terran McCanna <tmccanna@georgialibraries.org>
Signed-off-by: Galen Charlton <gmc@equinoxOLI.org>

Open-ILS/src/eg2/src/app/staff/admin/local/search-filter/query-dialog.component.ts

index f1d1776..534ef7a 100644 (file)
@@ -52,7 +52,7 @@ export class QueryDialogComponent extends DialogComponent implements OnInit {
     }
 
     save() {
-        if (!this.newQueryLabel || (!this.newQueryPosition && (this.newQueryPosition != 0)) || !this.newQueryText) {
+        if (!this.newQueryLabel || (!this.newQueryPosition && (this.newQueryPosition != '0')) || !this.newQueryText) {
             this.closeAndReset({notFilledOut: true});
         }
         const recToSave = this.prepareRecord();