Browse Source

[Minor] Fix empty table check

tags/3.0
Vsevolod Stakhov 3 years ago
parent
commit
08bf11078d
1 changed files with 3 additions and 0 deletions
  1. 3
    0
      lualib/lua_mime.lua

+ 3
- 0
lualib/lua_mime.lua View File

@@ -535,6 +535,9 @@ exports.modify_headers = function(task, hdr_alterations)
if not hdr_flattened[hname] then
hdr_flattened[hname] = {remove = {}}
end
if not hdr_flattened[hname].remove then
hdr_flattened[hname].remove = {}
end
local remove_tbl = hdr_flattened[hname].remove
if type(hdr) == 'number' then
table.insert(remove_tbl, hdr)

Loading…
Cancel
Save