Apply suggestion from @Copilot

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
Bereket Engida
2025-11-02 07:24:47 -08:00
committed by GitHub
parent ba30788f96
commit 4551df4ff0

View File

@@ -46,7 +46,7 @@ const STRIPE_ERROR_CODES = defineErrorCodes({
});
const getUrl = (ctx: GenericEndpointContext, url: string) => {
if (url.match(/^[a-zA-Z][a-zA-Z0-9+\-.]*:/)) {
if (/^[a-zA-Z][a-zA-Z0-9+\-.]*:/.test(url)) {
return url;
}
return `${ctx.context.options.baseURL}${