fix: expToLua convert null to nil

This commit is contained in:
Ching Pei Yang 2024-02-17 16:44:05 +01:00
parent 2b1749676d
commit 95566f10fb
No known key found for this signature in database
GPG Key ID: 062FBBCE1D0C5DD9
1 changed files with 2 additions and 0 deletions

View File

@ -19,6 +19,8 @@ in rec {
then lib.boolToString exp # if bool, convert to string
else if builtins.isInt exp
then builtins.toString exp # if int, convert to string
else if exp == null
then "nil"
else (builtins.toJSON exp); # otherwise jsonify the value and print as is
# convert list to a lua table