Fix error iterating nil object when mapping functions to line numbers (#320)
This commit is contained in:
parent
f97850dee6
commit
794fd0e14e
2
ldoc.lua
2
ldoc.lua
|
@ -573,12 +573,14 @@ if ldoc.prettify_files then
|
||||||
for F in file_list:iter() do
|
for F in file_list:iter() do
|
||||||
files:append(F.filename)
|
files:append(F.filename)
|
||||||
local mod = F.modules[1]
|
local mod = F.modules[1]
|
||||||
|
if mod then
|
||||||
local ls = List()
|
local ls = List()
|
||||||
for item in mod.items:iter() do
|
for item in mod.items:iter() do
|
||||||
ls:append(item.lineno)
|
ls:append(item.lineno)
|
||||||
end
|
end
|
||||||
linemap[F.filename] = ls
|
linemap[F.filename] = ls
|
||||||
end
|
end
|
||||||
|
end
|
||||||
|
|
||||||
if type(ldoc.prettify_files) == 'table' then
|
if type(ldoc.prettify_files) == 'table' then
|
||||||
files = tools.expand_file_list(ldoc.prettify_files, '*.*')
|
files = tools.expand_file_list(ldoc.prettify_files, '*.*')
|
||||||
|
|
Loading…
Reference in New Issue