mirror of
https://github.com/CommunityOx/ox_lib.git
synced 2026-08-19 07:56:02 +01:00
fix(client/radial): onSelect export handler
currentRadial is cleared before triggering the export.
This commit is contained in:
@@ -194,6 +194,8 @@ RegisterNUICallback('radialClick', function(index, cb)
|
|||||||
item = menuItems[itemIndex]
|
item = menuItems[itemIndex]
|
||||||
end
|
end
|
||||||
|
|
||||||
|
local menuResource = currentRadial and currentRadial.resource or item.resource
|
||||||
|
|
||||||
if item.menu then
|
if item.menu then
|
||||||
menuHistory[#menuHistory + 1] = { id = currentRadial and currentRadial.id, option = item.menu }
|
menuHistory[#menuHistory + 1] = { id = currentRadial and currentRadial.id, option = item.menu }
|
||||||
showRadial(item.menu)
|
showRadial(item.menu)
|
||||||
@@ -205,7 +207,7 @@ RegisterNUICallback('radialClick', function(index, cb)
|
|||||||
|
|
||||||
if onSelect then
|
if onSelect then
|
||||||
if type(onSelect) == 'string' then
|
if type(onSelect) == 'string' then
|
||||||
return exports[currentRadial and currentRadial.resource or item.resource][onSelect](0, currentMenu, itemIndex)
|
return exports[menuResource][onSelect](0, currentMenu, itemIndex)
|
||||||
end
|
end
|
||||||
|
|
||||||
onSelect(currentMenu, itemIndex)
|
onSelect(currentMenu, itemIndex)
|
||||||
|
|||||||
Reference in New Issue
Block a user