Skip to content

Commit

Permalink
Return early if no arguments
Browse files Browse the repository at this point in the history
  • Loading branch information
ludeeus committed Nov 16, 2023
1 parent a8a79a1 commit c0a243e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions custom_components/hacs/repositories/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -1392,6 +1392,9 @@ async def get_documentation(
**kwargs,
) -> str | None:
"""Get the documentation of the repository."""
if language is None and filename is None:
return None

version = (
(self.data.installed_version or self.data.installed_commit)
if self.data.installed
Expand Down
2 changes: 1 addition & 1 deletion custom_components/hacs/websocket/repository.py
Original file line number Diff line number Diff line change
Expand Up @@ -314,7 +314,7 @@ async def hacs_repository_documentation(
websocket_api.result_message(
msg["id"],
{
"content": await repository.get_documentation(language=msg.get("language")),
"content": await repository.get_documentation(language=msg.get("language", "en")),
},
)
)
Expand Down

0 comments on commit c0a243e

Please sign in to comment.