LP1929741 Improve catalog service sanity check
authorBill Erickson <berickxx@gmail.com>
Tue, 27 Apr 2021 14:32:05 +0000 (10:32 -0400)
committerBill Erickson <berickxx@gmail.com>
Tue, 4 Jan 2022 16:00:35 +0000 (11:00 -0500)
Signed-off-by: Bill Erickson <berickxx@gmail.com>
Signed-off-by: Galen Charlton <gmc@equinoxOLI.org>
Open-ILS/src/eg2/src/app/share/catalog/catalog.service.ts

index 1c861fa..99ed080 100644 (file)
@@ -393,7 +393,7 @@ export class CatalogService {
     }
 
     iconFormatLabel(code: string): string {
-        if (this.ccvmMap && this.ccvmMap.icon_format) {
+        if (Object.keys(this.ccvmMap).length) {
             const ccvm = this.ccvmMap.icon_format.filter(
                 format => format.code() === code)[0];
             if (ccvm) {