fix wrong reference

This commit is contained in:
Mads Rasmussen
2022-08-09 13:01:46 +02:00
parent bb4e4995af
commit d1c25e8a84

View File

@@ -46,7 +46,7 @@ export class UmbDocumentTypeStore {
const updated: DocumentTypeEntity[] = [...storedDocumentTypes];
fetchedDocumentTypes.forEach((fetchedDocumentType) => {
const index = storedDocumentTypes.map((storedNode) => storedNode.id).indexOf(fetchedDocumentTypes.id);
const index = storedDocumentTypes.map((storedNode) => storedNode.id).indexOf(fetchedDocumentType.id);
if (index !== -1) {
// If the data type is already in the store, update it