Skip to content

Commit

Permalink
Handle the empty strings as a group name
Browse files Browse the repository at this point in the history
  • Loading branch information
jbednar committed Nov 13, 2021
1 parent 3bb7dc6 commit 4a7b029
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion holoviews/core/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -346,6 +346,8 @@ def tree_attribute(identifier):
These custom attributes start with a capitalized character when
applicable (not applicable to underscore or certain unicode characters)
"""
if not identifier:
return True
if identifier[0].upper().isupper() is False and identifier[0] != '_':
return True
else:
Expand Down Expand Up @@ -1750,7 +1752,10 @@ def capitalize(string):
"""
Capitalizes the first letter of a string.
"""
return string[0].upper() + string[1:]
if string:
return string[0].upper() + string[1:]
else:
return string


def get_path(item):
Expand Down

0 comments on commit 4a7b029

Please sign in to comment.