From dc4ddb52ee9900730cc37b99792a98e12f996d0d Mon Sep 17 00:00:00 2001 From: Jingze <52855280+Jing-ze@users.noreply.github.com> Date: Thu, 8 Aug 2024 18:04:47 +0800 Subject: [PATCH] fix bug of empty config plugin still start (#1189) --- plugins/wasm-go/pkg/matcher/rule_matcher.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/plugins/wasm-go/pkg/matcher/rule_matcher.go b/plugins/wasm-go/pkg/matcher/rule_matcher.go index 52e15a9a2..acc0bbb82 100644 --- a/plugins/wasm-go/pkg/matcher/rule_matcher.go +++ b/plugins/wasm-go/pkg/matcher/rule_matcher.go @@ -123,8 +123,7 @@ func (m *RuleMatcher[PluginConfig]) ParseRuleConfig(config gjson.Result, if keyCount == 0 { // enable globally for empty config m.hasGlobalConfig = true - parsePluginConfig(config, &m.globalConfig) - return nil + return parsePluginConfig(config, &m.globalConfig) } if rulesJson, ok := obj[RULES_KEY]; ok { rules = rulesJson.Array()