From: Jane Sandberg <sandbej@linnbenton.edu>
Date: Fri, 4 Jan 2019 20:08:08 +0000 (-0800)
Subject: LP1809288: Fix a small javascript error when value is undefined
X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=e85ce6c10d5b7295bda9821be358cf6ed32bf481;p=contrib%2FConifer.git

LP1809288: Fix a small javascript error when value is undefined

Signed-off-by: Jane Sandberg <sandbej@linnbenton.edu>
Signed-off-by: Bill Erickson <berickxx@gmail.com>
---

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 233c3027d9..0d7fe1e0ff 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
@@ -138,9 +138,9 @@
   
             <ng-container *ngIf="field.datatype == 'link'">
               <ng-container *ngIf="field.readOnly">
-                <!-- in readOnly mode, if a value is presetn, it will
+                <!-- in readOnly mode, if a value is present, it will
                     live as the only item in the linkedValues array -->
-                <ng-container *ngIf="field.linkedValues[0]">
+                <ng-container *ngIf="(field.linkedValues != null) && (field.linkedValues.length)">
                   <span>{{field.linkedValues[0].name}}</span>
                 </ng-container>
               </ng-container>