Skip to content

Commit

Permalink
fix root lookup handler
Browse files Browse the repository at this point in the history
  • Loading branch information
cibere committed Dec 26, 2024
1 parent f133521 commit ba895b0
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions plugin/handlers/lookup_handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,13 @@ async def callback(self, query: Query):
f"Library '{library}' not found in settings", icon="Images/error.png"
)

if text is None:
if not text:
return Result.create_with_partial(
partial(self.plugin.api.open_url, url), title="Open documentation"
partial(self.plugin.api.open_url, url), title="Open documentation", icon=self.plugin.icons.get(library)
)

if not hasattr(self.plugin, "_rtfm_cache"):
await self.plugin.build_rtfm_lookup_table()
await self.plugin.build_rtfm_lookup_tables()

try:
cache = list(self.plugin._rtfm_cache[library].items())
Expand Down

0 comments on commit ba895b0

Please sign in to comment.