Skip to content

Commit d00dbb1

Browse files
author
Mark Sommers
committed
Checked nvim version for validate
1 parent 2571780 commit d00dbb1

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

lua/nvim-ts-autotag/utils.lua

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,12 @@ end
9494
---@param value any Value to compare
9595
---@return boolean `true` if `t` contains `value`
9696
M.list_contains = function(t, value)
97-
vim.validate("t", t, "table")
97+
if vim.fn.has("nvim-0.11") == 1 then
98+
vim.validate("t", t, "table")
99+
else
100+
vim.validate({ t = { t, "table" } })
101+
end
102+
98103
--- @cast t table<any,any>
99104

100105
for _, v in ipairs(t) do

0 commit comments

Comments
 (0)