@json-layout/core 1.15.3 → 1.15.4
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
CHANGED
package/src/state/state-node.js
CHANGED
|
@@ -234,7 +234,7 @@ const matchChildError = (compiledLayout, error, skeleton, dataPath, parentDataPa
|
|
|
234
234
|
}
|
|
235
235
|
|
|
236
236
|
/**
|
|
237
|
-
* should match any error related to the data node
|
|
237
|
+
* should match any error related to the data node no matter the origin in the schema
|
|
238
238
|
* @param {import('ajv').ErrorObject} error
|
|
239
239
|
* @param {string} dataPath
|
|
240
240
|
* @returns {boolean}
|
|
@@ -484,6 +484,16 @@ export function createStateNode (
|
|
|
484
484
|
}
|
|
485
485
|
}
|
|
486
486
|
|
|
487
|
+
if (skeleton.nullable && context.errors) {
|
|
488
|
+
// remove errors related to the management of nullable
|
|
489
|
+
context.errors = context.errors.filter(error => {
|
|
490
|
+
if (!matchDataPathError(error, dataPath)) return true
|
|
491
|
+
if (error.keyword === 'anyOf') return false
|
|
492
|
+
if (error.keyword === 'type' && error.params?.type === 'null') return false
|
|
493
|
+
return true
|
|
494
|
+
})
|
|
495
|
+
}
|
|
496
|
+
|
|
487
497
|
if (key === '$oneOf' && skeleton.childrenTrees) {
|
|
488
498
|
// find the oneOf child that was either previously selected
|
|
489
499
|
// or the one matching the specified discriminator
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"state-node.d.ts","sourceRoot":"","sources":["../../src/state/state-node.js"],"names":[],"mappings":"AA0QA;;;;;;;;;;;GAWG;AACH,4CAXW,OAAO,aAAa,EAAE,kBAAkB,EAAE,cAC1C,OAAO,yBAAyB,EAAE,UAAU,QAC5C,GAAG,WACH,OAAO,YAAY,EAAE,gBAAgB,WACrC,OAAO,oBAAoB,EAAE,OAAO,UACpC,OAAO,yBAAyB,EAAE,cAAc,aAChD,MAAM,CAAC,MAAM,EAAE,OAAO,KAAK,EAAE,gBAAgB,CAAC,YAC9C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