Fix bug where save duplicate action was mutating the real context
This commit is contained in:
parent
9ad25fcf88
commit
eedd1f0cf6
|
@ -35,7 +35,7 @@ const saveRowHandler = async (action, context) => {
|
||||||
const duplicateRowHandler = async (action, context) => {
|
const duplicateRowHandler = async (action, context) => {
|
||||||
const { fields, providerId, tableId } = action.parameters
|
const { fields, providerId, tableId } = action.parameters
|
||||||
if (providerId) {
|
if (providerId) {
|
||||||
let draft = context[providerId]
|
let draft = { ...context[providerId] }
|
||||||
if (fields) {
|
if (fields) {
|
||||||
for (let [field, value] of Object.entries(fields)) {
|
for (let [field, value] of Object.entries(fields)) {
|
||||||
draft[field] = value
|
draft[field] = value
|
||||||
|
|
Loading…
Reference in New Issue