From 0c4f7a544d75125b4f5d9a2d87502ff3626239b5 Mon Sep 17 00:00:00 2001 From: Ching Pei Yang Date: Sat, 27 Apr 2024 16:01:37 +0200 Subject: [PATCH] lib: fix crash on non-attrset arg --- lib/lua.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/lua.nix b/lib/lua.nix index 0ed2505..9e67b3f 100644 --- a/lib/lua.nix +++ b/lib/lua.nix @@ -58,7 +58,7 @@ in rec { # Convert a list of lua expressions to a lua table. The difference to listToLuaTable is that the elements here are expected to be lua expressions already, whereas listToLuaTable converts from nix types to lua first luaTable = items: ''{${concatStringsSep "," items}}''; - isLuaInline = {_type ? null, ...}: _type == "lua-inline"; + isLuaInline = object: (object._type or null) == "lua-inline"; toLuaObject = args: if isAttrs args