Compare commits

...

2 commits

Author SHA1 Message Date
Ching Pei Yang
414e7bc12f
Merge 8aa3a23e97 into 9d0247c599 2024-05-17 13:48:42 -04:00
Ching Pei Yang
8aa3a23e97 lib: do not filter out empty attrs in toLuaObject 2024-05-12 03:17:04 +02:00

View file

@ -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