Skip to content

Commit

Permalink
fix: only use vim.iter if available to avoid accidental breaking ch…
Browse files Browse the repository at this point in the history
…ange
  • Loading branch information
mehalter committed May 17, 2024
1 parent 171d4d5 commit 052d56f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lua/ibl/utils.lua
Original file line number Diff line number Diff line change
Expand Up @@ -425,7 +425,8 @@ end
---@vararg T
---@return T
M.tbl_join = function(...)
return vim.iter({ ... }):flatten():totable()
---@diagnostic disable-next-line: deprecated
return vim.iter and vim.iter({ ... }):flatten():totable() or vim.tbl_flatten { ... }
end

---@generic T
Expand Down

0 comments on commit 052d56f

Please sign in to comment.