@strapi/database 5.10.4 → 5.11.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
@@ -8449,7 +8449,7 @@ const isLinkTableEmpty = async (db, linkTableName)=>{
8449
8449
  }
8450
8450
 
8451
8451
  const isMorphRelationWithPivot = (attribute, pivot)=>{
8452
- return attribute.type === 'relation' && 'relation' in attribute && 'joinTable' in attribute && 'target' in attribute && 'name' in attribute.joinTable && 'pivotColumns' in attribute.joinTable && attribute.joinTable.pivotColumns.includes(pivot);
8452
+ return attribute.type === 'relation' && 'relation' in attribute && 'joinTable' in attribute && 'name' in attribute.joinTable && 'pivotColumns' in attribute.joinTable && attribute.joinTable.pivotColumns.includes(pivot);
8453
8453
  };
8454
8454
  const filterMorphRelationalAttributes = (attributes, pivot)=>{
8455
8455
  return Object.values(attributes).filter((attribute)=>isMorphRelationWithPivot(attribute, pivot));