From 95566f10fba984eca53813fc8ad2f813dd76ed45 Mon Sep 17 00:00:00 2001 From: Ching Pei Yang Date: Sat, 17 Feb 2024 16:44:05 +0100 Subject: [PATCH] fix: expToLua convert null to nil --- lib/lua.nix | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/lua.nix b/lib/lua.nix index 55e22d3..e37db7a 100644 --- a/lib/lua.nix +++ b/lib/lua.nix @@ -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