1
0
mirror of synced 2024-11-24 22:36:02 +03:00
This commit is contained in:
1on 2020-11-17 09:35:56 +03:00
parent 91b928f144
commit 46423dc8c6
4 changed files with 8 additions and 5 deletions

View File

@ -193,6 +193,9 @@ function setNested(obj, field, value) {
for (let i = 0; i < fieldParts.length; i++) {
const fieldPart = fieldParts[i];
const matches = fieldPart.match(/(.+)\[(\d+)\]$/);
if (subProxy === undefined) {
break;
}
if (matches) {
if (subProxy[matches[1]] === undefined) {
subProxy[matches[1]] = [];

File diff suppressed because one or more lines are too long

View File

@ -198,6 +198,9 @@
for (let i = 0; i < fieldParts.length; i++) {
const fieldPart = fieldParts[i];
const matches = fieldPart.match(/(.+)\[(\d+)\]$/);
if (subProxy === undefined) {
break;
}
if (matches) {
if (subProxy[matches[1]] === undefined) {
subProxy[matches[1]] = [];
@ -212,9 +215,6 @@
}
}
else {
if (subProxy === undefined) {
break;
}
if (i === fieldParts.length - 1) {
subProxy[fieldPart] = value;
break;

View File

@ -1,6 +1,6 @@
{
"name": "@retailcrm/vue-formulario",
"version": "0.5.0",
"version": "0.5.1",
"author": "RetailDriverLLC <integration@retailcrm.ru>",
"scripts": {
"build": "npm run build:esm & npm run build:umd & npm run build:iife & wait && echo \"Build complete:\nesm: $(gzip -c dist/formulario.esm.js | wc -c)b gzip\numd: $(gzip -c dist/formulario.umd.js | wc -c)b gzip\nmin: $(gzip -c dist/formulario.min.js | wc -c)b gzip\"",