mirror of
https://github.com/esx-framework/esx_core.git
synced 2026-09-04 08:13:21 +00:00
refactor(es_extended/server/functions): fix diagnostics
This commit is contained in:
@@ -387,15 +387,14 @@ end
|
||||
---@param model string|number
|
||||
---@param player number
|
||||
---@param cb function?
|
||||
---@diagnostic disable-next-line: duplicate-set-field
|
||||
---@return string?
|
||||
---@diagnostic disable-next-line: duplicate-set-field
|
||||
function ESX.GetVehicleType(model, player, cb)
|
||||
if cb and not ESX.IsFunctionReference(cb) then
|
||||
error("Invalid callback function")
|
||||
end
|
||||
|
||||
local promise = not cb and promise.new()
|
||||
|
||||
local function resolve(result)
|
||||
if promise then
|
||||
promise:resolve(result)
|
||||
|
||||
Reference in New Issue
Block a user