mirror of
https://github.com/pinnacle-comp/pinnacle.git
synced 2024-12-25 09:59:21 +01:00
Return from batch if requests
is empty
Fixes a hang if you tried to close a window with the keybind with no windows open
This commit is contained in:
parent
e734a716c0
commit
2e5853eabe
1 changed files with 4 additions and 0 deletions
|
@ -58,6 +58,10 @@ local util = {}
|
|||
---
|
||||
---@return T[] responses The results of each request in the same order that they were in `requests`.
|
||||
function util.batch(requests)
|
||||
if #requests == 0 then
|
||||
return {}
|
||||
end
|
||||
|
||||
local loop = require("cqueues").new()
|
||||
|
||||
local responses = {}
|
||||
|
|
Loading…
Reference in a new issue