1
0
Fork 0
mirror of https://github.com/jiriks74/presence.nvim synced 2024-12-28 19:02: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:
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

View file

@ -357,7 +357,12 @@ function Presence:authorize(on_done)
return return
end 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 self.is_authorized = true
if on_done then if on_done then