fix [modify_unit] cannot set attributes to false #4325

This commit is contained in:
gfgtdf 2019-09-08 19:50:56 +02:00 committed by GitHub
parent a40209b3a9
commit 7621b9b63e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -120,7 +120,7 @@ local function simple_modify_unit(cfg)
end
---------- SIMPLE ATTRIBUTES ----------
for i, name in ipairs(simple_attributes) do
if cfg[name] then
if cfg[name] ~= nil then
u[name] = cfg[name]
end
end