Skip to content

Commit

Permalink
fix nil api response value, update repo link
Browse files Browse the repository at this point in the history
  • Loading branch information
Gellipapa authored Jan 19, 2023
1 parent f761ecd commit 1fa30db
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion server/main.lua
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
HUD = {
VersionCheckURL = 'https://api.github.com/repos/esx-framework/esx-advanced-hud/releases/latest',
VersionCheckURL = 'https://api.github.com/repos/esx-framework/esx-hud/releases/latest',
OnlinePlayers = 0,
ErrorHandle = function(self, msg)
print(('[^1ERROR^7] ^3esx_hud^7: %s'):format(msg))
Expand Down Expand Up @@ -33,6 +33,9 @@ VERSION = {
return
end
if response then
response = json.decode(response)
if not response.tag_name then return end

latestVersion = response.tag_name:match('%d%.%d+%.%d+')
currentVersion = currentVersion:match('%d%.%d+%.%d+')

Expand Down

0 comments on commit 1fa30db

Please sign in to comment.