Skip to content

Commit

Permalink
chore: replace match with test on url
Browse files Browse the repository at this point in the history
Co-authored-by: Manuel Spigolon <[email protected]>
  • Loading branch information
msebastianb and Eomm authored Oct 11, 2023
1 parent ecc9ae6 commit 926e320
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions lib/util/match-params.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 926e320

Please sign in to comment.