Browse Source

[frontend] Validate if a cached MultiStoreEntry exists before trying to merge it

Johan Ahlen 5 years ago
parent
commit
0029d4d26d
1 changed files with 3 additions and 1 deletions
  1. 3 1
      desktop/core/src/desktop/js/catalog/dataCatalog.ts

+ 3 - 1
desktop/core/src/desktop/js/catalog/dataCatalog.ts

@@ -773,7 +773,9 @@ export class DataCatalog {
       }
       }
       try {
       try {
         const storeEntry = await this.multiTableStore.getItem<StoreMultiTableEntry>(identifier);
         const storeEntry = await this.multiTableStore.getItem<StoreMultiTableEntry>(identifier);
-        mergeMultiTableEntry(newEntry, storeEntry);
+        if (storeEntry) {
+          mergeMultiTableEntry(newEntry, storeEntry);
+        }
       } catch (err) {
       } catch (err) {
         console.warn(err);
         console.warn(err);
       }
       }