@ai-matrx/content-ir 0.10.1 → 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/index.cjs CHANGED
@@ -1660,9 +1660,10 @@ var KindStreamParser = class {
1660
1660
  }
1661
1661
  validateFinalFieldValue(fieldSchema, value, fieldName, objectKind) {
1662
1662
  if (fieldSchema.type === "json") return null;
1663
+ if (value === null && fieldSchema.nullable === true) return null;
1663
1664
  if (fieldSchema.type === "json[]") {
1664
1665
  if (value === null) {
1665
- return fieldSchema.nullable ? null : `Field "${fieldName}" on kind "${objectKind}" cannot be null.`;
1666
+ return `Field "${fieldName}" on kind "${objectKind}" cannot be null.`;
1666
1667
  }
1667
1668
  if (!Array.isArray(value)) {
1668
1669
  return `Field "${fieldName}" on kind "${objectKind}" must be an array.`;
@@ -1759,6 +1760,7 @@ var KindStreamParser = class {
1759
1760
  if (fieldSchema.type === "json") {
1760
1761
  return null;
1761
1762
  }
1763
+ if (value === null && fieldSchema.nullable === true) return null;
1762
1764
  if (fieldSchema.type === "array" || fieldSchema.type === "json[]") {
1763
1765
  return valueKind === "array" ? null : `Field "${fieldName}" must be an array.`;
1764
1766
  }