Fix error iterating nil object when mapping functions to line numbers (#320)
This commit is contained in:
parent
f97850dee6
commit
794fd0e14e
10
ldoc.lua
10
ldoc.lua
|
@ -573,11 +573,13 @@ 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]
|
||||||
local ls = List()
|
if mod then
|
||||||
for item in mod.items:iter() do
|
local ls = List()
|
||||||
ls:append(item.lineno)
|
for item in mod.items:iter() do
|
||||||
|
ls:append(item.lineno)
|
||||||
|
end
|
||||||
|
linemap[F.filename] = ls
|
||||||
end
|
end
|
||||||
linemap[F.filename] = ls
|
|
||||||
end
|
end
|
||||||
|
|
||||||
if type(ldoc.prettify_files) == 'table' then
|
if type(ldoc.prettify_files) == 'table' then
|
||||||
|
|
Loading…
Reference in New Issue