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
1 line
1.1 KiB
Plaintext
1 line
1.1 KiB
Plaintext
{"version":3,"file":"formatAbsoluteURL.js","names":["getAbsoluteUrl","url","URL","window","location","origin","href","formatAbsoluteURL","incomingURL","startsWith"],"sources":["../../src/utilities/formatAbsoluteURL.ts"],"sourcesContent":["const getAbsoluteUrl = (url) => {\n try {\n return new URL(url, window.location.origin).href\n } catch {\n return url\n }\n}\n\n/**\n * Ensures the provided URL is absolute. If not, it converts it to an absolute URL based\n * on the current window location.\n * Note: This MUST be called within the client environment as it relies on the `window` object\n * to determine the absolute URL.\n */\nexport const formatAbsoluteURL = (incomingURL: string) =>\n incomingURL?.startsWith('http://') || incomingURL?.startsWith('https://')\n ? incomingURL\n : getAbsoluteUrl(incomingURL)\n"],"mappings":"AAAA,MAAMA,cAAA,GAAkBC,GAAA;EACtB,IAAI;IACF,OAAO,IAAIC,GAAA,CAAID,GAAA,EAAKE,MAAA,CAAOC,QAAQ,CAACC,MAAM,EAAEC,IAAI;EAClD,EAAE,MAAM;IACN,OAAOL,GAAA;EACT;AACF;AAEA;;;;;;AAMA,OAAO,MAAMM,iBAAA,GAAqBC,WAAA,IAChCA,WAAA,EAAaC,UAAA,CAAW,cAAcD,WAAA,EAAaC,UAAA,CAAW,cAC1DD,WAAA,GACAR,cAAA,CAAeQ,WAAA","ignoreList":[]} |