Skip to content

Commit

Permalink
Fix case when decap is called with an empty string
Browse files Browse the repository at this point in the history
  • Loading branch information
albireox committed Jan 10, 2025
1 parent cc05ccd commit 1f27efe
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/gort/tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -1088,4 +1088,7 @@ def decap(string: Any):
if not isinstance(string, str):
string = str(string)

if len(string) == 0:
return ""

return string[0].lower() + string[1:]

0 comments on commit 1f27efe

Please sign in to comment.