refactor(treesitter): nil-check

This commit is contained in:
Folke Lemaitre committed 2023-02-20 16:01:02 +01:00
1 parent 0eef2c2f29
commit 079c685831
1 file changed
+1 -2
+1 -2
View File
@@ -14,8 +14,7 @@ return {
local enabled = false
if opts.textobjects then
for _, mod in ipairs({ "move", "select", "swap", "lsp_interop" }) do
local textobjects_opts = opts.textobjects[mod]
if textobjects_opts ~= nil and textobjects_opts.enable then
if opts.textobjects[mod] and opts.textobjects[mod].enable then
enabled = true
break
end