Only process deny patterns when enableDenyPatterns is true

This commit is contained in:
uiyzzi 2026-03-25 10:13:41 +08:00
parent 0abbc1eea7
commit a745aa1097

View file

@ -218,14 +218,16 @@ export function ExecSection({ form, onFieldChange }: ExecSectionProps) {
return
}
const denyPatterns = form.customDenyPatternsText
.split("\n")
.map((p) => p.trim())
.filter((p) => p.length > 0)
const allowPatterns = form.customAllowPatternsText
.split("\n")
.map((p) => p.trim())
.filter((p) => p.length > 0)
const denyPatterns = form.enableDenyPatterns
? form.customDenyPatternsText
.split("\n")
.map((p) => p.trim())
.filter((p) => p.length > 0)
: []
setIsLoading(true)
try {