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 propstr = ''
|
||||||
local modDesc = ''
|
local modDesc = ''
|
||||||
local modmt = getmetatable(require(mod))
|
local modmt = getmetatable(require(mod))
|
||||||
|
if modmt then
|
||||||
modDesc = modmt.__doc
|
modDesc = modmt.__doc
|
||||||
if modmt.__docProp then
|
if modmt.__docProp then
|
||||||
-- not all modules have docs for properties
|
-- not all modules have docs for properties
|
||||||
|
@ -70,6 +71,7 @@ commander.register('doc', function(args)
|
||||||
end
|
end
|
||||||
desc = string.format(modDocFormat, modDesc, propstr)
|
desc = string.format(modDocFormat, modDesc, propstr)
|
||||||
end
|
end
|
||||||
|
end
|
||||||
print(desc .. formattedFuncs)
|
print(desc .. formattedFuncs)
|
||||||
f:close()
|
f:close()
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue