mirror of
https://github.com/NotAShelf/nvf.git
synced 2024-11-26 15:06:45 +00:00
fix: expToLua convert null to nil
This commit is contained in:
parent
2b1749676d
commit
95566f10fb
1 changed files with 2 additions and 0 deletions
|
@ -19,6 +19,8 @@ in rec {
|
||||||
then lib.boolToString exp # if bool, convert to string
|
then lib.boolToString exp # if bool, convert to string
|
||||||
else if builtins.isInt exp
|
else if builtins.isInt exp
|
||||||
then builtins.toString exp # if int, convert to string
|
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
|
else (builtins.toJSON exp); # otherwise jsonify the value and print as is
|
||||||
|
|
||||||
# convert list to a lua table
|
# convert list to a lua table
|
||||||
|
|
Loading…
Reference in a new issue