mirror of
https://github.com/nvim-lua/plenary.nvim
synced 2024-09-16 13:24:05 +02:00
fix: return early to avoid errors with no asyncfns (#616)
When no async functions are supplied, it will be stuck because rx() waits forever. This diff fixes it.
This commit is contained in:
parent
a3e3bc82a3
commit
ec289423a1
1 changed files with 4 additions and 0 deletions
|
@ -53,6 +53,10 @@ end
|
|||
M.join = function(async_fns)
|
||||
local len = #async_fns
|
||||
local results = {}
|
||||
if len == 0 then
|
||||
return results
|
||||
end
|
||||
|
||||
local done = 0
|
||||
|
||||
local tx, rx = channel.oneshot()
|
||||
|
|
Loading…
Reference in a new issue