From 003100d3c4fc01770db98b5efe5d1642d12865a8 Mon Sep 17 00:00:00 2001 From: sammyette Date: Tue, 24 Oct 2023 23:52:53 -0400 Subject: [PATCH] fix: dont concat subdocs list if on main page --- nature/commands/doc.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nature/commands/doc.lua b/nature/commands/doc.lua index 2f8938f..ee1e37c 100644 --- a/nature/commands/doc.lua +++ b/nature/commands/doc.lua @@ -129,7 +129,7 @@ Available sections: ]] .. table.concat(modules, ', ') local doc, vals = handleYamlInfo(#args == 0 and doc or formatDocText(f:read '*a':gsub('-([%d]+)', '%1'))) - if #moddocs ~= 0 then + if #moddocs ~= 0 and f then doc = doc .. '\nSubdocs: ' .. table.concat(subdocs, ', ') .. '\n\n' end if f then f:close() end