From 3faa22cc69871ce62dcb18cce5a89cce79a0d68f Mon Sep 17 00:00:00 2001 From: Denys Bohdan Date: Tue, 31 Oct 2023 12:46:35 +0100 Subject: [PATCH] UIQM-571 Wait for PUT request to finish after deriving before redirecting to Inventory --- src/QuickMarcEditor/utils.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/QuickMarcEditor/utils.js b/src/QuickMarcEditor/utils.js index 0e501454..91be5cc6 100644 --- a/src/QuickMarcEditor/utils.js +++ b/src/QuickMarcEditor/utils.js @@ -155,7 +155,7 @@ export const saveLinksToNewRecord = async (mutator, externalId, marcRecord) => { // request derived MARC Bib record const marcPromise = mutator.quickMarcEditMarcRecord.GET({ params: { externalId } }); - Promise.all([instancePromise, marcPromise]).then(([{ _version }, derivedRecord]) => { + return Promise.all([instancePromise, marcPromise]).then(([{ _version }, derivedRecord]) => { // copy linking data to new record derivedRecord.fields = derivedRecord.fields.map((field) => { // matching field from POST request