Skip to content

Commit

Permalink
fix(client): prevent multiple instances of "go back" option
Browse files Browse the repository at this point in the history
Resolves #152.
  • Loading branch information
thelindat committed Jun 1, 2024
1 parent 557ecc8 commit c5e44fa
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions client/main.lua
Original file line number Diff line number Diff line change
Expand Up @@ -302,8 +302,7 @@ local function startTargeting()
elseif menuChanged or hasTarget ~= 1 and hidden ~= totalOptions then
hasTarget = options.size

if currentMenu then
totalOptions += 1
if currentMenu and options.__global[1] and options.__global[1].name ~= 'builtin:goback' then

This comment has been minimized.

Copy link
@varkosqc

varkosqc Jun 1, 2024

After this modification the back button no longer appears.

With this modification on my side, everything seems to work.

if currentMenu and options.__global and options.__global[1]?.name ~= 'builtin:goback' then

Does this update seem correct to you?

table.insert(options.__global, 1,
{
icon = 'fa-solid fa-circle-chevron-left',
Expand Down

0 comments on commit c5e44fa

Please sign in to comment.