@gravity-ui/dynamic-forms 5.4.0 → 5.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -13,7 +13,7 @@ const useMutators = (externalMutators) => {
|
|
|
13
13
|
const mergeSpec = (a = {}, b) => {
|
|
14
14
|
const result = (0, cloneDeep_1.default)(a);
|
|
15
15
|
const getKeys = (parent) => {
|
|
16
|
-
if ((0, isObjectLike_1.default)(parent)) {
|
|
16
|
+
if ((0, isObjectLike_1.default)(parent) && !Array.isArray(parent)) {
|
|
17
17
|
return (0, keys_1.default)(parent).reduce((acc, parentKey) => {
|
|
18
18
|
const childKeys = getKeys(parent[parentKey]);
|
|
19
19
|
return [
|
|
@@ -31,7 +31,7 @@ const useMutators = (externalMutators) => {
|
|
|
31
31
|
return result;
|
|
32
32
|
};
|
|
33
33
|
const mergeValuesOrErrors = (a = {}, b) => {
|
|
34
|
-
const result = (
|
|
34
|
+
const result = Object.assign({}, a);
|
|
35
35
|
Object.keys(b).forEach((key) => {
|
|
36
36
|
(0, set_1.default)(result, [key, 'value'], b[key]);
|
|
37
37
|
});
|
|
@@ -9,7 +9,7 @@ export const useMutators = (externalMutators) => {
|
|
|
9
9
|
const mergeSpec = (a = {}, b) => {
|
|
10
10
|
const result = cloneDeep(a);
|
|
11
11
|
const getKeys = (parent) => {
|
|
12
|
-
if (isObjectLike(parent)) {
|
|
12
|
+
if (isObjectLike(parent) && !Array.isArray(parent)) {
|
|
13
13
|
return keys(parent).reduce((acc, parentKey) => {
|
|
14
14
|
const childKeys = getKeys(parent[parentKey]);
|
|
15
15
|
return [
|
|
@@ -27,7 +27,7 @@ export const useMutators = (externalMutators) => {
|
|
|
27
27
|
return result;
|
|
28
28
|
};
|
|
29
29
|
const mergeValuesOrErrors = (a = {}, b) => {
|
|
30
|
-
const result =
|
|
30
|
+
const result = Object.assign({}, a);
|
|
31
31
|
Object.keys(b).forEach((key) => {
|
|
32
32
|
set(result, [key, 'value'], b[key]);
|
|
33
33
|
});
|