Files
klz-cables.com/.pnpm-store/v10/files/45/82878412caaa404b9e1b749941850839cc0f9ea33418fd56b58b55d479ac493378ea35e8324b30186a0758c2c5eff01b2f9dbaa777bfb2af202418733c7d44
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

20 lines
731 B
Plaintext

/**
* Sanitize the resize config. If the resize config has the `withoutReduction`
* property set to true, the `fit` and `position` properties will be set to `contain`
* and `top left` respectively.
*
* @param resizeConfig - the resize config
* @returns a sanitized resize config
*/ export const sanitizeResizeConfig = (resizeConfig)=>{
if (resizeConfig.withoutReduction) {
return {
...resizeConfig,
// Why fit `contain` should also be set to https://github.com/lovell/sharp/issues/3595
fit: resizeConfig?.fit || 'contain',
position: resizeConfig?.position || 'left top'
};
}
return resizeConfig;
};
//# sourceMappingURL=sanitizeResizeConfig.js.map