Skip to content

Commit

Permalink
fix: log_level failing when set to nil
Browse files Browse the repository at this point in the history
  • Loading branch information
vyfor committed Jun 15, 2024
1 parent 87dd378 commit 5a8c5dd
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions lua/cord/log.lua
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
local log_level

local function init(level)
log_level = vim.log.levels[string.upper(level)] or vim.log.levels.OFF

if log_level == vim.log.levels.OFF then log_level = -1 end
log_level = level and vim.log.levels[string.upper(level)]
or vim.log.levels.OFF
end

local function info(msg)
Expand Down

0 comments on commit 5a8c5dd

Please sign in to comment.