1
0
mirror of synced 2024-11-25 14:56:03 +03:00

fix: Fixed setNested when removed field from array of fields

This commit is contained in:
1on 2020-10-30 13:34:47 +03:00
parent 96a991f46f
commit 8f4081357d

View File

@ -52,6 +52,9 @@ export function setNested (obj: Record<string, any>, field: string, value: any):
subProxy = subProxy[matches[2]] subProxy = subProxy[matches[2]]
} }
} else { } else {
if (subProxy === undefined) {
break
}
if (i === fieldParts.length - 1) { if (i === fieldParts.length - 1) {
subProxy[fieldPart] = value subProxy[fieldPart] = value
break break