From 0c62341a1956438602843e54e644657accfa3917 Mon Sep 17 00:00:00 2001 From: tinyfan Date: Sun, 8 Dec 2024 20:04:09 +0800 Subject: [PATCH] bugfix: fix sniffer include url rule match not working problem because of missing return statement in predicate lambda --- src/api-sniffer.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/api-sniffer.ts b/src/api-sniffer.ts index 4d9224f..8839de5 100644 --- a/src/api-sniffer.ts +++ b/src/api-sniffer.ts @@ -25,8 +25,9 @@ export class ApiSniffer { const doesIncludeRuleMatches = !this.config.include ? true : this.config.include.some((config) => { - log.info(`Matching include url ${request.url} with request ${config.url}`); - doesUrlMatch(config.url, request.url) + const doesMatch = doesUrlMatch(config.url, request.url) + log.info(`Matching include url ${config.url} with request ${request.url} => ${doesMatch ? 'YES' : 'NO'}`); + return doesMatch }); const doesExcludeRuleMatches = !this.config.exclude ? true