summaryrefslogtreecommitdiff
path: root/script
diff options
context:
space:
mode:
Diffstat (limited to 'script')
-rw-r--r--script/proto/diagnostic.lua2
-rw-r--r--script/utility.lua2
2 files changed, 2 insertions, 2 deletions
diff --git a/script/proto/diagnostic.lua b/script/proto/diagnostic.lua
index 25f187db..43043b94 100644
--- a/script/proto/diagnostic.lua
+++ b/script/proto/diagnostic.lua
@@ -224,7 +224,7 @@ end
---@param name string
---@return string[]
-m.getGroups = util.catchReturn(function (name)
+m.getGroups = util.cacheReturn(function (name)
local groups = {}
for groupName, nameMap in pairs(m.diagnosticGroups) do
if nameMap[name] then
diff --git a/script/utility.lua b/script/utility.lua
index a72714f1..034f19d5 100644
--- a/script/utility.lua
+++ b/script/utility.lua
@@ -835,7 +835,7 @@ m.MODE_KV = { __mode = 'kv' }
---@generic T: fun(param: any):any
---@param func T
---@return T
-function m.catchReturn(func)
+function m.cacheReturn(func)
local cache = {}
return function (param)
if cache[param] == nil then