diff options
Diffstat (limited to 'script/vm/doc.lua')
-rw-r--r-- | script/vm/doc.lua | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/script/vm/doc.lua b/script/vm/doc.lua index 5a92a103..055b3d49 100644 --- a/script/vm/doc.lua +++ b/script/vm/doc.lua @@ -27,6 +27,9 @@ function vm.isMetaFile(uri) return false end local cache = files.getCache(uri) + if not cache then + return false + end if cache.isMeta ~= nil then return cache.isMeta end @@ -332,6 +335,9 @@ function vm.isDiagDisabledAt(uri, position, name) return false end local cache = files.getCache(uri) + if not cache then + return false + end if not cache.diagnosticRanges then cache.diagnosticRanges = {} for _, doc in ipairs(status.ast.docs) do |