Fixed tasklist bug

This commit is contained in:
Cooldude2606
2020-04-07 17:38:54 +01:00
parent 44a09d0991
commit 9214cc5239
4 changed files with 12 additions and 6 deletions

View File

@@ -93,7 +93,13 @@ function Gui.draw_left_flow(player)
for name, open_on_join in pairs(Gui.left_elements) do
-- Draw the element to the left flow
local left_element = Gui.defines[name](left_flow)
local draw_success, left_element = pcall(function()
return Gui.defines[name](left_flow)
end)
if not draw_success then
error('There as been an error with an element draw function:\n\t'..left_element)
end
-- Check if it should be open by default
local visible = type(open_on_join) == 'boolean' and open_on_join or false