Skip to content

Commit

Permalink
fix: check suggestions are empty or not
Browse files Browse the repository at this point in the history
  • Loading branch information
ryul99 committed Nov 5, 2024
1 parent 9fbe025 commit 8f1e701
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lua/avante/suggestion.lua
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ function Suggestion:suggest()
Utils.error("Error while decoding suggestions: " .. full_response, { once = true, title = "Avante" })
return
end
if not suggestions then
if not suggestions or next(suggestions) == nil then
Utils.info("No suggestions found", { once = true, title = "Avante" })
return
end
Expand Down

0 comments on commit 8f1e701

Please sign in to comment.