Skip to content

Commit

Permalink
perf: "RegExp.exec" instead of "String.match"
Browse files Browse the repository at this point in the history
  • Loading branch information
marco-carvalho authored Sep 16, 2024
1 parent 6a903f0 commit 36f5624
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion apps/web/src/hooks/useQueryArgs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ function extractParamValue(

const regex = new RegExp(regexPattern)

const match = path.match(regex)
const match = regex.exec(path)

return match?.[1] ?? ''
}
Expand Down

0 comments on commit 36f5624

Please sign in to comment.