diff --git a/frontend/src/utils.test.ts b/frontend/src/utils.test.ts index 897f2b8..69f8de6 100644 --- a/frontend/src/utils.test.ts +++ b/frontend/src/utils.test.ts @@ -43,7 +43,7 @@ describe("utils", () => { it("should handle null and undefined gracefully", () => { const result = cleanString(null); - expect(result).toBe(null); + expect(result).toBe(""); }); }); diff --git a/frontend/src/utils.ts b/frontend/src/utils.ts index 58ecfe4..e3150c5 100644 --- a/frontend/src/utils.ts +++ b/frontend/src/utils.ts @@ -17,4 +17,4 @@ export const div = (a: number, b: number) => { return (a - a % b) / b; }; -export const cleanString = (s: string | null) => s?.trim()?.replaceAll(/\s{2,}/g, " ") ?? null; \ No newline at end of file +export const cleanString = (s: string | null) => s?.trim()?.replaceAll(/\s{2,}/g, " ") ?? ""; \ No newline at end of file