From d0640792bf956f5517e3684025564fae8016a49e Mon Sep 17 00:00:00 2001 From: Loyalsoldier <10487845+Loyalsoldier@users.noreply.github.com> Date: Thu, 15 Aug 2024 12:51:53 +0800 Subject: [PATCH] Fix: wantedList must be specified in cutter format --- plugin/special/cutter.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/plugin/special/cutter.go b/plugin/special/cutter.go index fd4dcb59b80..2d52e16110c 100644 --- a/plugin/special/cutter.go +++ b/plugin/special/cutter.go @@ -46,6 +46,10 @@ func newCutter(action lib.Action, data json.RawMessage) (lib.InputConverter, err } } + if len(wantList) == 0 { + return nil, fmt.Errorf("type %s wantedList must be specified", typeCutter) + } + return &cutter{ Type: typeCutter, Action: action,