Invoking can return nil

Added fallback for current resource, future proofing against require and fixing entities target property
This commit is contained in:
Mr.Crowley committed 2026-08-14 17:38:09 -05:00
1 parent a34c7ba245
commit ad8788bbfd
4 files changed
+15 -15

No files matched your search

+2 -2
View File
@@ -74,11 +74,11 @@ local logHandlers = {
end,
qb = function(message)
TriggerEvent('qb-log:server:CreateLog', GetCurrentResourceName(), GetInvokingResource(), 'green', message, false)
TriggerEvent('qb-log:server:CreateLog', GetCurrentResourceName(), GetInvokingResource() or GetCurrentResourceName(), 'green', message, false)
end,
ox_lib = function(message)
lib.logger(GetInvokingResource(), GetCurrentResourceName(), message)
lib.logger(GetInvokingResource() or GetCurrentResourceName(), GetCurrentResourceName(), message)
end,
['built-in'] = function(message)