Merge pull request #958 from Blizzard/fix-context-addfilter

fix context.addFilter
This commit is contained in:
Tom van Dijck 2017-11-30 14:32:17 -08:00 committed by GitHub
commit 4be1372dcf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -99,10 +99,10 @@
function context.addFilter(ctx, key, value)
if type(value) == "table" then
for i = 1, #value do
value[i] = value[i]:lower()
value[i] = tostring(value[i]):lower()
end
elseif value then
value = value:lower()
elseif value ~= nil then
value = tostring(value):lower()
end
ctx.terms[key:lower()] = value
end