Skip to content

Commit

Permalink
Fix issue with nil data sidebars number in DevToolsScreen:UpdateChild…
Browse files Browse the repository at this point in the history
…ren()
  • Loading branch information
victorpopkov committed Sep 29, 2020
1 parent e34a1c9 commit 574ef0d
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion scripts/screens/devtoolsscreen.lua
Original file line number Diff line number Diff line change
Expand Up @@ -285,8 +285,12 @@ function DevToolsScreen:UpdateChildren(silent)
)
end

local number = (total_sidebar_data and sidebar_data_idx)
and string.format(" [%d/%d]", sidebar_data_idx, total_sidebar_data)
or ""

self.data:SetString((self.selected == MOD_DEV_TOOLS.SELECT.DATA and selected or unselected)
.. string.format(" [%d/%d]", sidebar_data_idx, total_sidebar_data)
.. number
.. "\n\n"
.. tostring(self.data_text))
end
Expand Down

0 comments on commit 574ef0d

Please sign in to comment.