1
0
mirror of https://github.com/jiriks74/presence.nvim synced 2024-11-23 20:37:50 +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:
Jiří Štefka 2023-09-29 01:34:08 +02:00 committed by GitHub
parent 85180bcc85
commit 2d57aa297b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -357,7 +357,12 @@ function Presence:authorize(on_done)
return
end
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