fix(treesitter): nil check #312 (#313)

Co-authored-by: Alexander Born <alexander.born@bmw.de>
This commit is contained in:
alexander-born 2023-02-20 15:58:52 +01:00 committed by GitHub
parent 9b175ab1bc
commit 0eef2c2f29
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -14,7 +14,8 @@ return {
local enabled = false local enabled = false
if opts.textobjects then if opts.textobjects then
for _, mod in ipairs({ "move", "select", "swap", "lsp_interop" }) do for _, mod in ipairs({ "move", "select", "swap", "lsp_interop" }) do
if opts.textobjects[mod].enable then local textobjects_opts = opts.textobjects[mod]
if textobjects_opts ~= nil and textobjects_opts.enable then
enabled = true enabled = true
break break
end end