diff options
Diffstat (limited to 'script-beta/workspace')
-rw-r--r-- | script-beta/workspace/workspace.lua | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/script-beta/workspace/workspace.lua b/script-beta/workspace/workspace.lua index bf930a5d..d2a0637f 100644 --- a/script-beta/workspace/workspace.lua +++ b/script-beta/workspace/workspace.lua @@ -195,6 +195,9 @@ end --- 查找符合指定file path的所有uri ---@param path string function m.findUrisByFilePath(path) + if type(path) ~= 'string' then + return {} + end local results = {} local posts = {} for uri in files.eachFile() do @@ -215,6 +218,9 @@ end --- 查找符合指定require path的所有uri ---@param path string function m.findUrisByRequirePath(path) + if type(path) ~= 'string' then + return {} + end local results = {} local mark = {} local searchers = {} |