Skip to content

Commit

Permalink
fix(log): handle nil when clearing log
Browse files Browse the repository at this point in the history
  • Loading branch information
sidlatau committed Oct 30, 2024
1 parent 3d6979b commit 7e6d861
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lua/flutter-tools/log.lua
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ function M.__resurrect()
end

function M.clear()
if api.nvim_buf_is_valid(M.buf) then
if M.buf and api.nvim_buf_is_valid(M.buf) then
vim.bo[M.buf].modifiable = true
api.nvim_buf_set_lines(M.buf, 0, -1, false, {})
vim.bo[M.buf].modifiable = false
Expand Down

0 comments on commit 7e6d861

Please sign in to comment.