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 21, 2023
1 parent 0867625 commit 74e14d6
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 74e14d6

Please sign in to comment.