@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/session.cjs CHANGED
@@ -1641,9 +1641,10 @@ var KindStreamParser = class {
1641
1641
  }
1642
1642
  validateFinalFieldValue(fieldSchema, value, fieldName, objectKind) {
1643
1643
  if (fieldSchema.type === "json") return null;
1644
+ if (value === null && fieldSchema.nullable === true) return null;
1644
1645
  if (fieldSchema.type === "json[]") {
1645
1646
  if (value === null) {
1646
- return fieldSchema.nullable ? null : `Field "${fieldName}" on kind "${objectKind}" cannot be null.`;
1647
+ return `Field "${fieldName}" on kind "${objectKind}" cannot be null.`;
1647
1648
  }
1648
1649
  if (!Array.isArray(value)) {
1649
1650
  return `Field "${fieldName}" on kind "${objectKind}" must be an array.`;
@@ -1740,6 +1741,7 @@ var KindStreamParser = class {
1740
1741
  if (fieldSchema.type === "json") {
1741
1742
  return null;
1742
1743
  }
1744
+ if (value === null && fieldSchema.nullable === true) return null;
1743
1745
  if (fieldSchema.type === "array" || fieldSchema.type === "json[]") {
1744
1746
  return valueKind === "array" ? null : `Field "${fieldName}" must be an array.`;
1745
1747
  }