Skip to content

Commit

Permalink
fix: prefer vim.islist over vim.tbl_islist (#413)
Browse files Browse the repository at this point in the history
  • Loading branch information
seblj authored May 18, 2024
1 parent 9ae570e commit a4caa0d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lua/mason-lspconfig/lspconfig_hook.lua
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,10 @@ local merge_in_place
---@param t1 table
---@param t2 table
merge_in_place = _.curryN(function(t1, t2)
local islist = vim.islist or vim.tbl_islist
for k, v in pairs(t2) do
if type(v) == "table" then
if type(t1[k]) == "table" and not vim.tbl_islist(t1[k]) then
if type(t1[k]) == "table" and not islist(t1[k]) then
merge_in_place(t1[k], v)
else
t1[k] = v
Expand Down

0 comments on commit a4caa0d

Please sign in to comment.