From f26bf237e49f90799fc3ff6ef0c0edc19c6ae9cb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9C=80=E8=90=8C=E5=B0=8F=E6=B1=90?= Date: Tue, 27 Oct 2020 17:20:57 +0800 Subject: =?UTF-8?q?=E5=85=88=E5=88=A4=E4=B8=AA=E7=B1=BB=E5=9E=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- script-beta/workspace/workspace.lua | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'script-beta/workspace') 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 = {} -- cgit v1.2.3