fix bug of empty config plugin still start (#1189)

This commit is contained in:
Jingze
2024-08-08 18:04:47 +08:00
committed by GitHub
parent 6f221ead53
commit dc4ddb52ee

View File

@@ -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()