Files
klz-cables.com/.pnpm-store/v10/files/98/0f2c487cbeb3a42da815ac042f2d5866960b5bf177bc6a8cd204c11b648ba799ed4a5e20bcc65d369ce71f3549e49339ce50bdb29869c124f8d1d5701c798f
Marc Mintel 5397309103
Some checks failed
Build & Deploy / 🔍 Prepare (push) Successful in 20s
Build & Deploy / 🧪 QA (push) Failing after 34s
Build & Deploy / 🏗️ Build (push) Has started running
Build & Deploy / 🚀 Deploy (push) Has been cancelled
Build & Deploy / 🧪 Smoke Test (push) Has been cancelled
Build & Deploy / ⚡ Lighthouse (push) Has been cancelled
Build & Deploy / 🔔 Notify (push) Has been cancelled
fix(products): fix breadcrumbs and product filtering (backport from main)
2026-02-24 16:04:21 +01:00

19 lines
689 B
Plaintext

// Helper function to extract value or relationship ID for database queries
export const extractValueOrRelationshipID = relationship => {
if (!relationship || typeof relationship !== 'object') {
return relationship;
}
// For polymorphic relationships, preserve structure but ensure IDs are strings
if (relationship?.relationTo && relationship?.value) {
return {
relationTo: relationship.relationTo,
value: String(relationship.value?.id || relationship.value)
};
}
// For regular relationships, extract ID
if (relationship?.id) {
return String(relationship.id);
}
return relationship;
};
//# sourceMappingURL=extractValueOrRelationshipID.js.map