Skip to content

Commit

Permalink
Better performance on fix issue premake#884
Browse files Browse the repository at this point in the history
  • Loading branch information
thomas desveaux committed Apr 12, 2018
1 parent 15829d5 commit 22e36f9
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions src/base/context.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 22e36f9

Please sign in to comment.