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:
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…
x
Reference in New Issue
Block a user