fix(diagnostic): check for nil in show_diagnostics (#15772)

This commit is contained in:
Gregory Anders 2021-09-23 10:52:21 -06:00 committed by GitHub
parent 057606e845
commit 9cde1e5891
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -379,7 +379,7 @@ end
---@param diagnostics table: The diagnostics to display
---@return table {popup_bufnr, win_id}
local function show_diagnostics(opts, diagnostics)
if vim.tbl_isempty(diagnostics) then
if not diagnostics or vim.tbl_isempty(diagnostics) then
return
end
local lines = {}