If attributes_to_keep is nil, don't write to it
This commit is contained in:
parent
1b0258f149
commit
d0d8df88fe
1 changed files with 6 additions and 2 deletions
|
@ -10,11 +10,15 @@ function table_to_list(tags, result, factor_table)
|
|||
local f = mapping[v]
|
||||
if (f ~= nil) then
|
||||
table.insert(list, f);
|
||||
result.attributes_to_keep[key] = v
|
||||
if (result.attributes_to_keep ~= nil) then
|
||||
result.attributes_to_keep[key] = v
|
||||
end
|
||||
end
|
||||
else
|
||||
table.insert(list, mapping);
|
||||
result.attributes_to_keep[key] = v
|
||||
if (result.attributes_to_keep ~= nil) then
|
||||
result.attributes_to_keep[key] = v
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue