summaryrefslogtreecommitdiff
path: root/script-beta/core/diagnostics/redundant-parameter.lua
diff options
context:
space:
mode:
Diffstat (limited to 'script-beta/core/diagnostics/redundant-parameter.lua')
-rw-r--r--script-beta/core/diagnostics/redundant-parameter.lua5
1 files changed, 2 insertions, 3 deletions
diff --git a/script-beta/core/diagnostics/redundant-parameter.lua b/script-beta/core/diagnostics/redundant-parameter.lua
index b9b994b8..8d486aea 100644
--- a/script-beta/core/diagnostics/redundant-parameter.lua
+++ b/script-beta/core/diagnostics/redundant-parameter.lua
@@ -64,9 +64,8 @@ return function (uri, callback)
local funcArgs
vm.eachDef(func, function (info)
local src = info.source
- local f = src.value
- if f and f.type == 'function' then
- local args = countFuncArgs(f)
+ if src.type == 'function' then
+ local args = countFuncArgs(src)
if not funcArgs or args > funcArgs then
funcArgs = args
end