1
0
Fork 0
mirror of synced 2024-07-09 08:16:34 +12:00

Fix bug where save duplicate action was mutating the real context

This commit is contained in:
Andrew Kingston 2021-12-09 14:36:57 +00:00
parent 9ad25fcf88
commit eedd1f0cf6

View file

@ -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