Skip to content

Commit

Permalink
fix: possible nil value in health check
Browse files Browse the repository at this point in the history
  • Loading branch information
folke committed May 1, 2021
1 parent 9a2faed commit b1627ca
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lua/which-key/keys.lua
Expand Up @@ -372,7 +372,8 @@ function M.check_health()
else
msg = "buffer-local keymap overriding global"
end
msg = (msg .. " for mode **%q**, buf: %d, lhs: **%q**"):format(dup.mode, dup.buf, dup.prefix)
msg = (msg .. " for mode **%q**, buf: %d, lhs: **%q**"):format(dup.mode, dup.buf or "",
dup.prefix)
if dup.buf == dup.other.buffer then
vim.fn["health#report_error"](msg)
else
Expand Down

0 comments on commit b1627ca

Please sign in to comment.