2
2
mirror of https://github.com/Hilbis/Hilbish synced 2025-03-31 02:33:23 +00:00

fix(doc): check if modmt exists before trying to get module prop docs

This commit is contained in:
TorchedSammy 2022-05-08 16:02:24 -04:00
parent dd678a4a75
commit 15035c02cb
Signed by: sammyette
GPG Key ID: 904FC49417B44DCD

View File

@ -58,6 +58,7 @@ commander.register('doc', function(args)
local propstr = ''
local modDesc = ''
local modmt = getmetatable(require(mod))
if modmt then
modDesc = modmt.__doc
if modmt.__docProp then
-- not all modules have docs for properties
@ -70,6 +71,7 @@ commander.register('doc', function(args)
end
desc = string.format(modDocFormat, modDesc, propstr)
end
end
print(desc .. formattedFuncs)
f:close()