@ai-matrx/content-ir 0.10.0 → 0.10.2

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/dist/core.js CHANGED
@@ -1652,9 +1652,10 @@ var KindStreamParser = class {
1652
1652
  }
1653
1653
  validateFinalFieldValue(fieldSchema, value, fieldName, objectKind) {
1654
1654
  if (fieldSchema.type === "json") return null;
1655
+ if (value === null && fieldSchema.nullable === true) return null;
1655
1656
  if (fieldSchema.type === "json[]") {
1656
1657
  if (value === null) {
1657
- return fieldSchema.nullable ? null : `Field "${fieldName}" on kind "${objectKind}" cannot be null.`;
1658
+ return `Field "${fieldName}" on kind "${objectKind}" cannot be null.`;
1658
1659
  }
1659
1660
  if (!Array.isArray(value)) {
1660
1661
  return `Field "${fieldName}" on kind "${objectKind}" must be an array.`;
@@ -1751,6 +1752,7 @@ var KindStreamParser = class {
1751
1752
  if (fieldSchema.type === "json") {
1752
1753
  return null;
1753
1754
  }
1755
+ if (value === null && fieldSchema.nullable === true) return null;
1754
1756
  if (fieldSchema.type === "array" || fieldSchema.type === "json[]") {
1755
1757
  return valueKind === "array" ? null : `Field "${fieldName}" must be an array.`;
1756
1758
  }