TypeError: Cannot read property 'some' of undefined
I'm relatively new to Sanity, but it looks like it doesn't return null values if a specific field hasn't been initialized yet. When that's the case, product.collections—which toDoc[bToAKey] evaluates to—is null, and doesn't have access to some().
Previously, it looks like we were setting values if they were missing. Probably need that for new instances again.
This call in sync-utils/src/sanity/syncRelationships.ts fails if there is no existing relationship.
I'm relatively new to Sanity, but it looks like it doesn't return null values if a specific field hasn't been initialized yet. When that's the case,
product.collections
—whichtoDoc[bToAKey]
evaluates to—is null, and doesn't have access tosome()
.Previously, it looks like we were setting values if they were missing. Probably need that for new instances again.