fix bug in helpers

This commit is contained in:
Pedro Alves 2021-03-24 13:57:33 +00:00
parent da8e5a4736
commit 70791a75fa

View file

@ -17,7 +17,7 @@ rec {
(n: v: if head (stringToCharacters n) == "@" then (n: v: if head (stringToCharacters n) == "@" then
toLuaObject v toLuaObject v
else "[${toLuaObject n}] = " + (toLuaObject v)) else "[${toLuaObject n}] = " + (toLuaObject v))
(filterAttrs (n: v: !isNull v || v == {}) args))) + "}" (filterAttrs (n: v: !isNull v && toLuaObject v != "{}") args))) + "}"
else if builtins.isList args then else if builtins.isList args then
"{" + concatMapStringsSep "," toLuaObject args + "}" "{" + concatMapStringsSep "," toLuaObject args + "}"
else if builtins.isString args then else if builtins.isString args then