mirror of
https://github.com/jiriks74/presence.nvim
synced 2024-12-27 18:42:35 +01:00
fix(Presence:authorize): attempt to index local 'response' (a nil value)
Co-authored-by: Taken <taken@mairimashita.org>
This commit is contained in:
parent
85180bcc85
commit
2d57aa297b
1 changed files with 6 additions and 1 deletions
|
@ -357,7 +357,12 @@ function Presence:authorize(on_done)
|
|||
return
|
||||
end
|
||||
|
||||
self.log:info(string.format("Authorized with Discord for %s", response.data.user.username))
|
||||
if not response then
|
||||
self.log:info(string.format("Authorized with Discord for %s", "Response was nil"))
|
||||
else
|
||||
self.log:info(string.format("Authorized with Discord for %s", response.data.user.username))
|
||||
end
|
||||
|
||||
self.is_authorized = true
|
||||
|
||||
if on_done then
|
||||
|
|
Loading…
Reference in a new issue