Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions packages/core/src/reducers/core.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,13 @@
*/

import cloneDeep from 'lodash/cloneDeep';
import setFp from 'lodash/fp/set';
import setWithFp from 'lodash/fp/setWith';
import unsetFp from 'lodash/fp/unset';
import get from 'lodash/get';
import filter from 'lodash/filter';
import isEqual from 'lodash/isEqual';
import isFunction from 'lodash/isFunction';
import isObject from 'lodash/isObject';
import type Ajv from 'ajv';
import type { ErrorObject, ValidateFunction } from 'ajv';
import {
Expand Down Expand Up @@ -273,7 +274,8 @@ export const coreReducer: Reducer<JsonFormsCore, CoreActions> = (
const newData = action.updater(cloneDeep(oldData));
let newState: any;
if (newData !== undefined) {
newState = setFp(
newState = setWithFp(
(v: any) => (isObject(v) ? v : {}),
action.path,
newData,
state.data === undefined ? {} : state.data
Expand Down