LP1929741 Improve catalog service sanity check
authorBill Erickson <berickxx@gmail.com>
Tue, 27 Apr 2021 14:32:05 +0000 (10:32 -0400)
committerJane Sandberg <js7389@princeton.edu>
Sun, 2 Oct 2022 15:02:49 +0000 (08:02 -0700)
Signed-off-by: Bill Erickson <berickxx@gmail.com>
Signed-off-by: Galen Charlton <gmc@equinoxOLI.org>
Signed-off-by: Jane Sandberg <js7389@princeton.edu>
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) {