Avoid use of org-select 'selected' value when it's not defined/null.
Signed-off-by: Bill Erickson <berickxx@gmail.com>
Signed-off-by: Galen Charlton <gmc@equinoxinitiative.org>
{{r.label}}
</ng-template>
-<ng-container *ngIf="readOnly">
+<ng-container *ngIf="readOnly && selected">
<span>{{selected.label}}</span>
</ng-container>
}
// 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() {