Skip to content

Commit

Permalink
fix(config): use level num directly
Browse files Browse the repository at this point in the history
  • Loading branch information
rcarriga committed Dec 5, 2022
1 parent 859056f commit e51722e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion lua/notify/config/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ function Config.setup(custom_config)
function config.level()
local level = user_config.level
if type(level) == "number" then
level = vim.log.levels[level] or vim.log.levels.INFO
return level
end
return vim.log.levels[vim.fn.toupper(level)] or vim.log.levels.INFO
end
Expand Down
1 change: 1 addition & 0 deletions tests/unit/init_spec.lua
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ describe("checking public interface", function()
assert.are.same({
{
icon = "",
id = 1,
level = "ERROR",
message = { "test" },
render = notifs[1].render,
Expand Down

0 comments on commit e51722e

Please sign in to comment.