From 5bb0b5f67d58ec17c989c9eafbe6dfe2fe69b71a Mon Sep 17 00:00:00 2001 From: Galen Charlton Date: Tue, 1 Sep 2020 11:33:45 -0400 Subject: [PATCH] fm-edit: be more resilient in case linked values cannot be fleshed (as might happen in various permissions scenarios; for example, a user may be able to fetch providers but not the EDI default account associated with it) Signed-off-by: Galen Charlton --- Open-ILS/src/eg2/src/app/share/fm-editor/fm-editor.component.html | 2 +- Open-ILS/src/eg2/src/app/share/fm-editor/fm-editor.component.ts | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/Open-ILS/src/eg2/src/app/share/fm-editor/fm-editor.component.html b/Open-ILS/src/eg2/src/app/share/fm-editor/fm-editor.component.html index e20c037006..431dc287cc 100644 --- a/Open-ILS/src/eg2/src/app/share/fm-editor/fm-editor.component.html +++ b/Open-ILS/src/eg2/src/app/share/fm-editor/fm-editor.component.html @@ -51,7 +51,7 @@ - + {{field.linkedValues[0].label}} diff --git a/Open-ILS/src/eg2/src/app/share/fm-editor/fm-editor.component.ts b/Open-ILS/src/eg2/src/app/share/fm-editor/fm-editor.component.ts index 8dfa4e08dd..7ea7c94f58 100644 --- a/Open-ILS/src/eg2/src/app/share/fm-editor/fm-editor.component.ts +++ b/Open-ILS/src/eg2/src/app/share/fm-editor/fm-editor.component.ts @@ -420,7 +420,8 @@ export class FmRecordEditorComponent || this.idl.getClassSelector(class_) || idField; return list.map(item => { - return {id: item[idField](), label: item[selector]()}; + if (item !== undefined) + return {id: item[idField](), label: item[selector]()}; }); } -- 2.11.0