Skip to content

Commit

Permalink
Fix error when enabling texture packs (#13829)
Browse files Browse the repository at this point in the history
  • Loading branch information
grorp committed Sep 23, 2023
1 parent c247761 commit 4cf900c
Showing 1 changed file with 11 additions and 5 deletions.
16 changes: 11 additions & 5 deletions builtin/mainmenu/tab_content.lua
Expand Up @@ -18,11 +18,7 @@

local packages_raw, packages

local function on_change(type)
if type ~= "ENTER" then
return
end

local function update_packages()
if not pkgmgr.global_mods then
pkgmgr.refresh_globals()
end
Expand All @@ -48,7 +44,17 @@ local function on_change(type)
is_equal, nil, {})
end

local function on_change(type)
if type == "ENTER" then
update_packages()
end
end

local function get_formspec(tabview, name, tabdata)
if not packages then
update_packages()
end

if not tabdata.selected_pkg then
tabdata.selected_pkg = 1
end
Expand Down

0 comments on commit 4cf900c

Please sign in to comment.