From 8aa3a23e9742babdbf98fab17b082fbf1cf1751c Mon Sep 17 00:00:00 2001 From: Ching Pei Yang Date: Sun, 12 May 2024 03:17:04 +0200 Subject: [PATCH] lib: do not filter out empty attrs in toLuaObject --- lib/lua.nix | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/lib/lua.nix b/lib/lua.nix index 9e67b3f..8cef5d5 100644 --- a/lib/lua.nix +++ b/lib/lua.nix @@ -65,6 +65,7 @@ in rec { then if isLuaInline args then args.expr + # if nobody is using this we should get rid of this else if hasAttr "__empty" args then "{ }" else @@ -76,10 +77,7 @@ in rec { then toLuaObject v else "[${toLuaObject n}] = " + (toLuaObject v)) (filterAttrs - ( - _: v: - (v != null) && (toLuaObject v != "{}") - ) + (_: v: v != null) args))) + "}" else if isList args