diff options
author | Matteo Bigoi <[email protected]> | 2021-10-22 20:51:32 +0100 |
---|---|---|
committer | GitHub <[email protected]> | 2021-10-22 21:51:32 +0200 |
commit | 10df0b5ffd0fd96b210747e9169dad08c81dca1b (patch) | |
tree | c4466aa31084df10dec5d764ca4e82328af6bdf6 /lua | |
parent | d4fd273b5534ac610a3b6f361acb676cb688925f (diff) |
[Bugfix] ensure the log level is never nil (#1820)
Diffstat (limited to 'lua')
-rw-r--r-- | lua/lvim/core/log.lua | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/lua/lvim/core/log.lua b/lua/lvim/core/log.lua index 688246f4..502fd19b 100644 --- a/lua/lvim/core/log.lua +++ b/lua/lvim/core/log.lua @@ -90,6 +90,9 @@ function Log:init() vim.notify = function(msg, vim_log_level, opts) nvim_notify_params = opts or {} -- vim_log_level can be omitted + if vim_log_level == nil then + vim_log_level = Log.levels["INFO"] + end if type(vim_log_level) == "string" then vim_log_level = Log.levels[(vim_log_level):upper() or "INFO"] end |