Skip to content

Commit e4f79a4

Browse files
committed
fix(util): Util.try can now work without an error message
1 parent 847ef09 commit e4f79a4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lua/lazy/core/util.lua

+1-1
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ function M.try(fn, opts)
9292
end
9393
level = level + 1
9494
end
95-
msg = msg .. "\n\n" .. err
95+
msg = (msg and (msg .. "\n\n") or "") .. err
9696
if #trace > 0 then
9797
msg = msg .. "\n\n# stacktrace:\n" .. table.concat(trace, "\n")
9898
end

0 commit comments

Comments
 (0)