LP1929741 Improve catalog service sanity check
authorBill Erickson <berickxx@gmail.com>
Tue, 27 Apr 2021 14:32:05 +0000 (10:32 -0400)
committerGalen Charlton <gmc@equinoxOLI.org>
Mon, 29 Aug 2022 20:49:32 +0000 (20:49 +0000)
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) {