LP1904036 User setting values may be null
authorBill Erickson <berickxx@gmail.com>
Sun, 4 Apr 2021 21:36:45 +0000 (17:36 -0400)
committerGalen Charlton <gmc@equinoxOLI.org>
Fri, 28 Oct 2022 00:13:29 +0000 (20:13 -0400)
Signed-off-by: Bill Erickson <berickxx@gmail.com>
Signed-off-by: Jane Sandberg <js7389@princeton.edu>
Signed-off-by: Galen Charlton <gmc@equinoxOLI.org>
Open-ILS/src/eg2/src/app/staff/circ/patron/edit.component.ts

index dcf9721..508e22c 100644 (file)
@@ -1449,7 +1449,8 @@ export class EditComponent implements OnInit, AfterViewInit {
                 newValue = this.patron[field]();
 
             } else if (matches = field.match(/(\w+)_notify/)) {
-                newValue = this.userSettings['opac.hold_notify'].match(matches[1]) !== null;
+                const holdNotify = this.userSettings['opac.hold_notify'] || '';
+                newValue = holdNotify.match(matches[1]) !== null;
             }
 
             const oldValue = this.holdNotifyValues[field];