summaryrefslogtreecommitdiff
path: root/script/workspace
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2021-02-22 12:06:27 +0800
committer最萌小汐 <sumneko@hotmail.com>2021-02-22 12:06:27 +0800
commit5ab18375ca7f1b47fc589c30d419b23627e1a91f (patch)
tree2b5a0a5e07c44b6ec05b6d9a3650d66ae1fb1a22 /script/workspace
parentf0003c7e75767e42b34d24be6ce24bf90ead04cf (diff)
downloadlua-language-server-5ab18375ca7f1b47fc589c30d419b23627e1a91f.zip
fix runtime errors
Diffstat (limited to 'script/workspace')
-rw-r--r--script/workspace/workspace.lua3
1 files changed, 3 insertions, 0 deletions
diff --git a/script/workspace/workspace.lua b/script/workspace/workspace.lua
index f222e907..667ac56f 100644
--- a/script/workspace/workspace.lua
+++ b/script/workspace/workspace.lua
@@ -435,6 +435,9 @@ function m.getRelativePath(uri)
end
function m.isWorkspaceUri(uri)
+ if not m.uri then
+ return false
+ end
local luri = files.getUri(uri)
local ruri = files.getUri(m.uri)
return luri:sub(1, #ruri) == ruri