From 926e320b07b5d3bc30d470d47b8a67264ea18c0c Mon Sep 17 00:00:00 2001 From: Marius Sebastian Besel <145235082+msebastianb@users.noreply.github.com> Date: Wed, 11 Oct 2023 18:59:23 +0200 Subject: [PATCH] chore: replace match with test on url Co-authored-by: Manuel Spigolon --- lib/util/match-params.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/util/match-params.js b/lib/util/match-params.js index 7d255c74..e3972f3b 100644 --- a/lib/util/match-params.js +++ b/lib/util/match-params.js @@ -4,8 +4,7 @@ const paramPattern = /\{[^{}]+\}/g function hasParams (url) { if (!url) return false - const matches = url.match(paramPattern) - return matches !== null && matches.length > 0 + return paramPattern.test(url) } function matchParams (url) {