mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-01 19:17:02 -04:00
fix: check if invalidate_query_cache[lang] is set before invalidating
This commit is contained in:
parent
fe47dbe02b
commit
917ae3da7c
1 changed files with 3 additions and 1 deletions
|
|
@ -101,7 +101,9 @@ do
|
|||
function M.invalidate_query_cache(lang, query_name)
|
||||
if lang and query_name then
|
||||
cache[lang][query_name] = nil
|
||||
query_files_cache[lang][query_name] = nil
|
||||
if query_files_cache[lang] then
|
||||
query_files_cache[lang][query_name] = nil
|
||||
end
|
||||
elseif lang and not query_name then
|
||||
query_files_cache[lang] = nil
|
||||
for query_name, _ in pairs(cache[lang]) do
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue