@json-layout/core 1.15.6 → 1.15.8
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.
- package/package.json +1 -1
- package/src/state/state-node.js +2 -2
package/package.json
CHANGED
package/src/state/state-node.js
CHANGED
|
@@ -90,7 +90,7 @@ const produceStateNodeDataChildrenArray = produce((draft, children) => {
|
|
|
90
90
|
/** @type {(draft: Record<string, unknown>[], parentDataPath: string, additionalPropertiesErrors?: import('ajv').ErrorObject[], propertyKeys?: string[], removePropertyKeys?: string[]) => Record<string, unknown>[]} */
|
|
91
91
|
const produceStateNodeDataArray = produce((draft, parentDataPath, additionalPropertiesErrors, propertyKeys, removePropertyKeys) => {
|
|
92
92
|
for (let i = 0; i < draft.length; i++) {
|
|
93
|
-
if (!(draft[i] instanceof File)) {
|
|
93
|
+
if (typeof draft[i] === 'object' && draft[i] !== null && !(draft[i] instanceof File)) {
|
|
94
94
|
draft[i] = cleanNodeData(draft[i], parentDataPath + '/' + i, additionalPropertiesErrors, propertyKeys, removePropertyKeys)
|
|
95
95
|
}
|
|
96
96
|
}
|
|
@@ -790,7 +790,7 @@ export function createStateNode (
|
|
|
790
790
|
} else if (typeof nodeData === 'object' && !(nodeData instanceof File) && !children) {
|
|
791
791
|
// case of an object outside of a composite component, probably a select
|
|
792
792
|
nodeData = cleanNodeData(
|
|
793
|
-
|
|
793
|
+
/** @type {Record<string, unknown>} */(nodeData ?? {}),
|
|
794
794
|
dataPath,
|
|
795
795
|
context.additionalPropertiesErrors,
|
|
796
796
|
skeleton?.propertyKeys.length ? skeleton?.propertyKeys : undefined,
|