From ec1f746a71dfb981f093bf00322db75d559fd6b6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9C=80=E8=90=8C=E5=B0=8F=E6=B1=90?= Date: Sat, 23 Apr 2022 00:42:10 +0800 Subject: fix optional parameters --- script/core/diagnostics/missing-parameter.lua | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) (limited to 'script/core/diagnostics/missing-parameter.lua') diff --git a/script/core/diagnostics/missing-parameter.lua b/script/core/diagnostics/missing-parameter.lua index 34cbdab6..e2cf4982 100644 --- a/script/core/diagnostics/missing-parameter.lua +++ b/script/core/diagnostics/missing-parameter.lua @@ -69,16 +69,7 @@ return function (uri, callback) callback { start = source.start, finish = source.finish, + message = lang.script('DIAG_MISS_ARGS', funcArgs, callArgs), } - for i = #source.args - delta + 1, #source.args do - local arg = source.args[i] - if arg then - callback { - start = arg.start, - finish = arg.finish, - message = lang.script('DIAG_MISS_ARGS', funcArgs, callArgs) - } - end - end end) end -- cgit v1.2.3