Skip to content

Commit

Permalink
refactor(utils): simplify removeWhitespace
Browse files Browse the repository at this point in the history
  • Loading branch information
tkohr committed Nov 22, 2023
1 parent d9e43fe commit 01c50c4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion libs/util/shared/src/lib/utils/remove-whitespace.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
export const removeWhitespace = function (str: string): string {
return str ? str.replace(/\s+/g, ' ').trim() : undefined
return str?.replace(/\s+/g, ' ').trim()
}

0 comments on commit 01c50c4

Please sign in to comment.