Skip to content

Commit 574ef0d

Browse files
committed
Fix issue with nil data sidebars number in DevToolsScreen:UpdateChildren()
1 parent e34a1c9 commit 574ef0d

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

scripts/screens/devtoolsscreen.lua

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -285,8 +285,12 @@ function DevToolsScreen:UpdateChildren(silent)
285285
)
286286
end
287287

288+
local number = (total_sidebar_data and sidebar_data_idx)
289+
and string.format(" [%d/%d]", sidebar_data_idx, total_sidebar_data)
290+
or ""
291+
288292
self.data:SetString((self.selected == MOD_DEV_TOOLS.SELECT.DATA and selected or unselected)
289-
.. string.format(" [%d/%d]", sidebar_data_idx, total_sidebar_data)
293+
.. number
290294
.. "\n\n"
291295
.. tostring(self.data_text))
292296
end

0 commit comments

Comments
 (0)