mirror of
https://github.com/esx-framework/esx_core.git
synced 2026-08-29 01:08:54 +00:00
fix(es_extended/shared/functions): invokingResource not being displayed
This commit is contained in:
@@ -192,6 +192,7 @@ function ESX.Await(conditionFunc, errorMessage, timeoutMs)
|
||||
ESX.AssertType(errorMessage, "string", "errorMessage should be a string.")
|
||||
end
|
||||
|
||||
local invokingResource = GetInvokingResource()
|
||||
local startTimeMs = GetGameTimer()
|
||||
while GetGameTimer() - startTimeMs < timeoutMs do
|
||||
local result = conditionFunc()
|
||||
@@ -204,7 +205,7 @@ function ESX.Await(conditionFunc, errorMessage, timeoutMs)
|
||||
end
|
||||
|
||||
if errorMessage then
|
||||
error(("[%s] -> %s"):format(GetInvokingResource(), errorMessage))
|
||||
error(("[%s] -> %s"):format(invokingResource, errorMessage))
|
||||
end
|
||||
|
||||
return false
|
||||
|
||||
Reference in New Issue
Block a user