From eedd1f0cf6f58b51964267a835ee4dc9648c73c2 Mon Sep 17 00:00:00 2001 From: Andrew Kingston Date: Thu, 9 Dec 2021 14:36:57 +0000 Subject: [PATCH] Fix bug where save duplicate action was mutating the real context --- packages/client/src/utils/buttonActions.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/client/src/utils/buttonActions.js b/packages/client/src/utils/buttonActions.js index b1d49b0351..3a8ac63411 100644 --- a/packages/client/src/utils/buttonActions.js +++ b/packages/client/src/utils/buttonActions.js @@ -35,7 +35,7 @@ const saveRowHandler = async (action, context) => { const duplicateRowHandler = async (action, context) => { const { fields, providerId, tableId } = action.parameters if (providerId) { - let draft = context[providerId] + let draft = { ...context[providerId] } if (fields) { for (let [field, value] of Object.entries(fields)) { draft[field] = value