Files
klz-cables.com/.pnpm-store/v10/files/42/78c93a066614e52394f073c8ddd47d9661cb219857c88beca3f0628510641fbe00c48eff909099d2a1eadc9eaee3b487826e65661def818506126aba311968
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

15 lines
602 B
Plaintext

const getAbsoluteUrl = url => {
try {
return new URL(url, window.location.origin).href;
} catch {
return url;
}
};
/**
* Ensures the provided URL is absolute. If not, it converts it to an absolute URL based
* on the current window location.
* Note: This MUST be called within the client environment as it relies on the `window` object
* to determine the absolute URL.
*/
export const formatAbsoluteURL = incomingURL => incomingURL?.startsWith('http://') || incomingURL?.startsWith('https://') ? incomingURL : getAbsoluteUrl(incomingURL);
//# sourceMappingURL=formatAbsoluteURL.js.map