@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.js CHANGED
@@ -8470,7 +8470,7 @@ const isLinkTableEmpty = async (db, linkTableName)=>{
8470
8470
  }
8471
8471
 
8472
8472
  const isMorphRelationWithPivot = (attribute, pivot)=>{
8473
- 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);
8473
+ return attribute.type === 'relation' && 'relation' in attribute && 'joinTable' in attribute && 'name' in attribute.joinTable && 'pivotColumns' in attribute.joinTable && attribute.joinTable.pivotColumns.includes(pivot);
8474
8474
  };
8475
8475
  const filterMorphRelationalAttributes = (attributes, pivot)=>{
8476
8476
  return Object.values(attributes).filter((attribute)=>isMorphRelationWithPivot(attribute, pivot));