Small fix for last used collection when it's a published collection.

This commit is contained in:
Franco Montenegro 2022-02-24 12:13:04 -03:00 committed by jessopb
parent ca1d0e71b7
commit aa008d8a61

View file

@ -74,6 +74,7 @@ const collectionsReducer = handleActions(
return {
...state,
[collectionKey]: newList,
lastUsedCollection: isDeletingLastUsedCollection ? undefined : lastUsedCollection,
};
} else {
if (newEditList[id]) {
@ -117,6 +118,7 @@ const collectionsReducer = handleActions(
edited: newEditList,
unpublished: newUnpublishedList,
pending: newPendingList,
lastUsedCollection: newPendingList[claimId],
};
},
@ -128,6 +130,7 @@ const collectionsReducer = handleActions(
return {
...state,
[collectionKey]: { ...lists, [id]: collection },
lastUsedCollection: collection,
};
}
@ -136,6 +139,7 @@ const collectionsReducer = handleActions(
return {
...state,
edited: { ...lists, [id]: collection },
lastUsedCollection: collection,
};
}
const { unpublished: lists } = state;