LP1809288: Fix a small javascript error when value is undefined
authorJane Sandberg <sandbej@linnbenton.edu>
Fri, 4 Jan 2019 20:08:08 +0000 (12:08 -0800)
committerBill Erickson <berickxx@gmail.com>
Fri, 25 Jan 2019 17:08:16 +0000 (12:08 -0500)
Signed-off-by: Jane Sandberg <sandbej@linnbenton.edu>
Signed-off-by: Bill Erickson <berickxx@gmail.com>
Open-ILS/src/eg2/src/app/share/fm-editor/fm-editor.component.html

index 233c302..0d7fe1e 100644 (file)
   
             <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>