fix: crash when opening a non blurred menu (#565)
itable_find() returns two values, so without specifying the second parameter to select_index() lua will use the second return value for that.
This commit is contained in:

committed by
GitHub

parent
8ad5330a4b
commit
5b4ccc8874
@@ -271,7 +271,7 @@ function Menu:reset_navigation()
|
||||
if self.mouse_nav then
|
||||
self:select_item_below_cursor()
|
||||
elseif menu.items and #menu.items > 0 then
|
||||
self:select_index(itable_find(menu.items, function(item) return item.selectable ~= false end))
|
||||
self:select_index(itable_find(menu.items, function(item) return item.selectable ~= false end), menu)
|
||||
else
|
||||
self:select_index(nil)
|
||||
end
|
||||
|
Reference in New Issue
Block a user