Skip to content

Commit

Permalink
Fix sonar: refactor to use an optional chain expression
Browse files Browse the repository at this point in the history
  • Loading branch information
ipasic-softserve committed Jul 29, 2024
1 parent c28b02a commit 757a5aa
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/utils/helper-functions.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ export const createUrlPath = (
query = {}
) => {
let trimmedUrl = URL
while (trimmedUrl && trimmedUrl.endsWith('/')) {
while (trimmedUrl?.endsWith('/')) {
trimmedUrl = trimmedUrl.slice(0, -1)
}

Expand Down

0 comments on commit 757a5aa

Please sign in to comment.