🐛 fix(endpoints.py): add check to skip empty custom_component_dict to prevent potential errors

This commit is contained in:
Gabriel Luiz Freitas Almeida 2023-08-08 16:35:15 -03:00
commit 4b47f9f196

View file

@ -51,6 +51,8 @@ def get_all():
logger.info(f"Loading {len(custom_component_dicts)} category(ies)")
for custom_component_dict in custom_component_dicts:
# custom_component_dict is a dict of dicts
if not custom_component_dict:
continue
category = list(custom_component_dict.keys())[0]
logger.info(
f"Loading {len(custom_component_dict[category])} component(s) from category {category}"