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