@claritylabs/cl-sdk 0.14.0 → 0.14.1

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.mjs CHANGED
@@ -2216,6 +2216,15 @@ function formatAddress(addr) {
2216
2216
  return parts.join(", ");
2217
2217
  }
2218
2218
  function chunkDocument(doc) {
2219
+ const ensureArray = (v) => Array.isArray(v) ? v : [];
2220
+ doc = {
2221
+ ...doc,
2222
+ taxesAndFees: ensureArray(doc.taxesAndFees),
2223
+ ratingBasis: ensureArray(doc.ratingBasis),
2224
+ claimsContacts: ensureArray(doc.claimsContacts),
2225
+ regulatoryContacts: ensureArray(doc.regulatoryContacts),
2226
+ thirdPartyAdministrators: ensureArray(doc.thirdPartyAdministrators)
2227
+ };
2219
2228
  const chunks = [];
2220
2229
  const docId = doc.id;
2221
2230
  function stringMetadata(entries) {