fix: add nil check for message before sending notifications

This commit is contained in:
yetone
2025-08-02 23:37:24 +08:00
parent 5fedb3a2c6
commit 03f0456d30

View File

@@ -377,6 +377,7 @@ function M.norm(path) return M.path.normalize(path) end
---@param msg string|string[]
---@param opts? LazyNotifyOpts
function M.notify(msg, opts)
if msg == nil then return end
if vim.in_fast_event() then
return vim.schedule(function() M.notify(msg, opts) end)
end