mirror of https://github.com/Hilbis/Hilbish
fix(doc): check if modmt exists before trying to get module prop docs
parent
dd678a4a75
commit
15035c02cb
|
@ -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()
|
||||
|
||||
|
|
Loading…
Reference in New Issue