aboutsummaryrefslogtreecommitdiffstats
path: root/lua/conform
diff options
context:
space:
mode:
authorCenk Kılıç <cenk1cenk2cenk3@gmail.com>2024-04-24 15:44:56 +0200
committerGitHub <noreply@github.com>2024-04-24 06:44:56 -0700
commit4660e534bf7678ee0f85879aa75fdcb6855612c2 (patch)
treed08760306a861762f6ffa59a30cc5797d3c60a66 /lua/conform
parent475c096d24562cf1fa992731869e17ea6d75d2d9 (diff)
fix(util): new function throwing an error when the given extended value is nil (#385)
Diffstat (limited to 'lua/conform')
-rw-r--r--lua/conform/util.lua8
1 files changed, 4 insertions, 4 deletions
diff --git a/lua/conform/util.lua b/lua/conform/util.lua
index 950bdae..2f334d0 100644
--- a/lua/conform/util.lua
+++ b/lua/conform/util.lua
@@ -135,11 +135,11 @@ M.extend_args = function(args, extra_args, opts)
end
local ret = {}
if opts.append then
- vim.list_extend(ret, args)
- vim.list_extend(ret, extra_args)
+ vim.list_extend(ret, args or {})
+ vim.list_extend(ret, extra_args or {})
else
- vim.list_extend(ret, extra_args)
- vim.list_extend(ret, args)
+ vim.list_extend(ret, extra_args or {})
+ vim.list_extend(ret, args or {})
end
return ret
end