mirror of
https://github.com/NotAShelf/neovim-flake.git
synced 2024-12-19 06:29:47 +01:00
fix: throw error when converting unknown object to lua
This commit is contained in:
parent
40b985c066
commit
a57e89dece
1 changed files with 2 additions and 2 deletions
|
@ -1,7 +1,7 @@
|
|||
# Helpers for converting values to lua
|
||||
{lib}: let
|
||||
inherit (lib) mapAttrsToList filterAttrs concatStringsSep concatMapStringsSep stringToCharacters boolToString;
|
||||
inherit (builtins) hasAttr head;
|
||||
inherit (builtins) hasAttr head throw typeOf;
|
||||
in rec {
|
||||
# Convert a null value to lua's nil
|
||||
nullString = value:
|
||||
|
@ -84,5 +84,5 @@ in rec {
|
|||
then "${toString args}"
|
||||
else if (args == null)
|
||||
then "nil"
|
||||
else "";
|
||||
else throw "could not convert object of type `${typeOf args}` to lua object";
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue