Skip to content

Commit

Permalink
fix(utils): correct after tests
Browse files Browse the repository at this point in the history
  • Loading branch information
AleksanderNekr committed Jun 21, 2024
1 parent dd6c364 commit 632fd8c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion frontend/src/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,4 @@ export const div = (a: number, b: number) => {
return (a - a % b) / b;
};

export const cleanString = (s: string) => s?.trim()?.replaceAll(/\s{2,}/g, " ");
export const cleanString = (s: string | null) => s?.trim()?.replaceAll(/\s{2,}/g, " ") ?? null;

0 comments on commit 632fd8c

Please sign in to comment.