From 658dad7463ccf357a7eae36fb3852d44f666452c Mon Sep 17 00:00:00 2001 From: zeppi Date: Tue, 3 Aug 2021 15:25:54 -0400 Subject: [PATCH 1/2] fix collection edit --- src/redux/reducers/collections.js | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/src/redux/reducers/collections.js b/src/redux/reducers/collections.js index 1bcb347..39aac44 100644 --- a/src/redux/reducers/collections.js +++ b/src/redux/reducers/collections.js @@ -90,8 +90,15 @@ const collectionsReducer = handleActions( [ACTIONS.COLLECTION_PENDING]: (state, action) => { const { localId, claimId } = action.data; - const { edited: editList, unpublished: unpublishedList, pending: pendingList } = state; + const { + resolved: resolvedList, + edited: editList, + unpublished: unpublishedList, + pending: pendingList, + } = state; + const newEditList = Object.assign({}, editList); + const newResolvedList = Object.assign({}, resolvedList); const newUnpublishedList = Object.assign({}, unpublishedList); const newPendingList = Object.assign({}, pendingList); @@ -101,7 +108,10 @@ const collectionsReducer = handleActions( delete newUnpublishedList[localId]; } else { // edit update - newPendingList[claimId] = Object.assign({}, newEditList[claimId]); + newPendingList[claimId] = Object.assign( + {}, + newEditList[claimId] || newResolvedList[claimId] + ); delete newEditList[claimId]; } -- 2.45.2 From 699a7e8a3b1e70464d89dc97bb4631161dc7b94d Mon Sep 17 00:00:00 2001 From: zeppi Date: Tue, 3 Aug 2021 15:28:26 -0400 Subject: [PATCH 2/2] build --- dist/bundle.es.js | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/dist/bundle.es.js b/dist/bundle.es.js index fd373c5..9e7d8d0 100644 --- a/dist/bundle.es.js +++ b/dist/bundle.es.js @@ -7718,8 +7718,15 @@ const collectionsReducer = handleActions({ [COLLECTION_PENDING]: (state, action) => { const { localId, claimId } = action.data; - const { edited: editList, unpublished: unpublishedList, pending: pendingList } = state; + const { + resolved: resolvedList, + edited: editList, + unpublished: unpublishedList, + pending: pendingList + } = state; + const newEditList = Object.assign({}, editList); + const newResolvedList = Object.assign({}, resolvedList); const newUnpublishedList = Object.assign({}, unpublishedList); const newPendingList = Object.assign({}, pendingList); @@ -7729,7 +7736,7 @@ const collectionsReducer = handleActions({ delete newUnpublishedList[localId]; } else { // edit update - newPendingList[claimId] = Object.assign({}, newEditList[claimId]); + newPendingList[claimId] = Object.assign({}, newEditList[claimId] || newResolvedList[claimId]); delete newEditList[claimId]; } -- 2.45.2