Skip to content

Commit

Permalink
fix: guard against nil result (#17)
Browse files Browse the repository at this point in the history
  • Loading branch information
topaxi authored Mar 26, 2024
1 parent 2d5189e commit b70f182
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions lua/tailwind-tools/lsp.lua
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@ M.color_request = function(bufnr)

client.request("textDocument/documentColor", params, function(err, result, _, _)
if err then return log.error(err.message) end
if not result then return end
if not vim.api.nvim_buf_is_valid(bufnr) then return end

---@type lsp.ColorInformation[]
Expand Down

0 comments on commit b70f182

Please sign in to comment.