[fix] Revert brackets notation

This commit is contained in:
ljf 2021-06-03 18:16:53 +02:00
parent e58bfaedcd
commit 955c774602

View file

@ -282,8 +282,8 @@ export default {
const newKey = key.replace('_', '').replace('es', '')
const addDiff = arrayDiff(formData[key], user[dashedKey])
const rmDiff = arrayDiff(user[dashedKey], formData[key])
if (addDiff.length) data['add_' + newKey + '[]'] = addDiff
if (rmDiff.length) data['remove_' + newKey + '[]'] = rmDiff
if (addDiff.length) data['add_' + newKey] = addDiff
if (rmDiff.length) data['remove_' + newKey] = rmDiff
}
for (const key in formData) {