From 42b27077ffbbe26f93a0ca109e4ae997960741e3 Mon Sep 17 00:00:00 2001 From: Kakarot Date: Tue, 19 May 2026 21:56:19 -0500 Subject: [PATCH] GetShared fix --- shared/main.lua | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/shared/main.lua b/shared/main.lua index a883688..7d42c1a 100644 --- a/shared/main.lua +++ b/shared/main.lua @@ -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)