From 296dca77f83f01bd78783ae27817c8ae84bbef29 Mon Sep 17 00:00:00 2001 From: Bill Erickson Date: Fri, 16 Aug 2019 16:56:42 -0400 Subject: [PATCH] LP1840050 Org select sanity checks on selected value Avoid use of org-select 'selected' value when it's not defined/null. Signed-off-by: Bill Erickson Signed-off-by: Galen Charlton --- Open-ILS/src/eg2/src/app/share/org-select/org-select.component.html | 2 +- Open-ILS/src/eg2/src/app/share/org-select/org-select.component.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Open-ILS/src/eg2/src/app/share/org-select/org-select.component.html b/Open-ILS/src/eg2/src/app/share/org-select/org-select.component.html index d49217c6fb..32bc94e2b9 100644 --- a/Open-ILS/src/eg2/src/app/share/org-select/org-select.component.html +++ b/Open-ILS/src/eg2/src/app/share/org-select/org-select.component.html @@ -4,7 +4,7 @@ {{r.label}} - + {{selected.label}} diff --git a/Open-ILS/src/eg2/src/app/share/org-select/org-select.component.ts b/Open-ILS/src/eg2/src/app/share/org-select/org-select.component.ts index dee3248939..dc14debcbf 100644 --- a/Open-ILS/src/eg2/src/app/share/org-select/org-select.component.ts +++ b/Open-ILS/src/eg2/src/app/share/org-select/org-select.component.ts @@ -182,7 +182,7 @@ export class OrgSelectComponent implements OnInit { } // Remove the tree-padding spaces when matching. - formatter = (result: OrgDisplay) => result.label.trim(); + formatter = (result: OrgDisplay) => result ? result.label.trim() : ''; // reset the state of the component reset() { -- 2.11.0