diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2019-09-23 18:59:57 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2019-09-23 18:59:57 +0800 |
commit | 4e1937f19ed61d3e7163aa06e267f3e92489e321 (patch) | |
tree | acbdea488c5ab38db080d2ff44360e4611f1dbbd /server-beta/src/files.lua | |
parent | 7e9154e64d2a743903b1f9400bd254a039816ca0 (diff) | |
download | lua-language-server-4e1937f19ed61d3e7163aa06e267f3e92489e321.zip |
修正一些报错
Diffstat (limited to 'server-beta/src/files.lua')
-rw-r--r-- | server-beta/src/files.lua | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/server-beta/src/files.lua b/server-beta/src/files.lua index 0d8bd526..15190630 100644 --- a/server-beta/src/files.lua +++ b/server-beta/src/files.lua @@ -41,9 +41,11 @@ function m.setText(uri, text) pub.removeTask(file.compiling) end file.compiling = pub.syncTask('compile', text, function (ast) - ast.uri = originUri - file.ast = ast file.compiling = nil + file.ast = ast + if ast then + ast.uri = originUri + end local onCompiledList = file.onCompiledList if onCompiledList then file.onCompiledList = nil |