From d6d06645804a75b657cf47af2c93e421180082bb Mon Sep 17 00:00:00 2001 From: medchedli Date: Wed, 4 Jun 2025 18:02:03 +0100 Subject: [PATCH] fix: update formatWithSlashes function to return "//" for invalid input --- frontend/src/utils/string.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/src/utils/string.ts b/frontend/src/utils/string.ts index 669d8af6..d22f50d1 100644 --- a/frontend/src/utils/string.ts +++ b/frontend/src/utils/string.ts @@ -30,7 +30,7 @@ export const isRegexString = (str: any) => { * Ensures value is wrapped in slashes: /value/ */ export const formatWithSlashes = (value: string): string => { - if (!value || typeof value !== "string") return "/"; + if (!value || typeof value !== "string") return "//"; if (!value.startsWith("/")) value = "/" + value; if (!value.endsWith("/")) value = value + "/";