GetShared fix

This commit is contained in:
Kakarot
2026-05-19 21:56:19 -05:00
parent 74ac036d4a
commit 42b27077ff
+6 -4
View File
@@ -17,12 +17,14 @@ local function GetCoreObject(filters)
end
exports('GetCoreObject', GetCoreObject)
--- @param namespace 'Vehicles' | 'VehicleHashes' | 'Items' | 'Gangs' | 'Jobs' | 'Locations' | 'Weapons'
--- @param item string
--- @return table
--- @param namespace 'Vehicles' | 'VehicleHashes' | 'Items' | 'Gangs' | 'Jobs' | 'Locations' | 'Weapons' | 'StarterItems'
--- @param item string?
--- @return table?
function GetShared(namespace, item)
local ns = QBCore.Shared[namespace]
return ns and ns[item]
if not ns then return nil end
return item and ns[item] or ns
end
exports('GetShared', GetShared)