diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2021-02-04 17:02:06 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2021-02-04 17:02:06 +0800 |
commit | ea009881054fe774a59f440db8da15ce0425a464 (patch) | |
tree | 46ad5a3b1ef0f86a44c940c4efbe4650b39b1b50 /script/core/document-symbol.lua | |
parent | 6e7c082aa3e1011cdecd1761f7d04eabc0e2b8ba (diff) | |
download | lua-language-server-ea009881054fe774a59f440db8da15ce0425a464.zip |
fix runtime errors
Diffstat (limited to 'script/core/document-symbol.lua')
-rw-r--r-- | script/core/document-symbol.lua | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/script/core/document-symbol.lua b/script/core/document-symbol.lua index f06e613c..3bfc744c 100644 --- a/script/core/document-symbol.lua +++ b/script/core/document-symbol.lua @@ -222,11 +222,11 @@ end local function makeSymbol(uri) local ast = files.getAst(uri) - if not ast then + local text = files.getText(uri) + if not ast or not text then return nil end - local text = files.getText(uri) local symbols = {} local used = {} guide.eachSource(ast.ast, function (source) |