tweak(core/version/getter): add if statement back for invoking resource

This commit is contained in:
BerkieBb
2022-02-19 12:51:13 +01:00
committed by GitHub
parent e9a6d4acd0
commit 41f01f842b
+3 -1
View File
@@ -145,7 +145,9 @@ exports('AddGangs', AddGangs)
local function GetCoreVersion(InvokingResource)
local resourceVersion = GetResourceMetadata(GetCurrentResourceName(), 'version')
print(("%s called qbcore version check: %s"):format(InvokingResource or 'Unknown Resource', resourceVersion))
if InvokingResource and InvokingResource ~= '' then
print(("%s called qbcore version check: %s"):format(InvokingResource or 'Unknown Resource', resourceVersion))
end
return resourceVersion
end
QBCore.Functions.GetCoreVersion = GetCoreVersion