From af08b44b083556c2af97b1112eb3b8412daff58f Mon Sep 17 00:00:00 2001 From: Briain O'Driscoll Date: Fri, 13 May 2022 20:43:02 +0100 Subject: [PATCH] add or nil({}) to extend function to avoid 'expected table' error --- lua/user/lsp/settings/jsonls.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/user/lsp/settings/jsonls.lua b/lua/user/lsp/settings/jsonls.lua index 1fffa68..e202e1e 100644 --- a/lua/user/lsp/settings/jsonls.lua +++ b/lua/user/lsp/settings/jsonls.lua @@ -169,7 +169,7 @@ local schemas = { } local function extend(tab1, tab2) - for _, value in ipairs(tab2) do + for _, value in ipairs(tab2 or {}) do table.insert(tab1, value) end return tab1