Better performance on fix issue #884

This commit is contained in:
thomas desveaux 2018-04-12 23:40:16 +02:00
parent 15829d5967
commit 22e36f97b8

View File

@ -137,13 +137,11 @@
--
function context.mergeFilters(ctx, src)
if src.terms ~= nil then
for k, v in pairs(src.terms) do
ctx.terms[k] = table.joinunique(ctx.terms[k] or {}, src.terms[k])
if #ctx.terms[k] == 1 then
ctx.terms[k] = ctx.terms[k][1]
end
for k, v in pairs(src.terms) do
if k == "tags" then
ctx.terms[k] = table.join(ctx.terms[k], v)
else
ctx.terms[k] = v
end
end
end