Skip to content

Commit

Permalink
BUGFIX: I forgot assert returns all its arguments on success, we were…
Browse files Browse the repository at this point in the history
… using the error message as body to http.request
  • Loading branch information
nairyo committed Dec 30, 2024
1 parent b75641c commit 95a9a40
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ankiconnect.lua
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ We can prevent this by modifying/adding the scheme when it's wrong/missing
function AnkiConnect:get_url()
local url = conf.url:get_value()
if self.last_url == url then
return assert(self.valid_url, "URL was not validated yet, we should not get here")
return (assert(self.valid_url, "URL was not validated yet, we should not get here"))
end
local valid_url = url
local _, scheme_end_idx, scheme, ssl = url:find("^(http(s?)://)")
Expand Down

0 comments on commit 95a9a40

Please sign in to comment.