Skip to content

Commit

Permalink
Fix regexp comparison
Browse files Browse the repository at this point in the history
  • Loading branch information
ehmicky committed Mar 13, 2022
1 parent 0b82922 commit f8672f0
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/config/normalize/lib/wild_wild_path/tokens/regexp.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,11 @@ const normalize = function (token) {

// Check if two tokens are the same
const equals = function (tokenA, tokenB) {
return tokenA.source === tokenB.source && tokenA.flags === tokenB.flags
return (
tokenA.source === tokenB.source &&
tokenA.flags === tokenB.flags &&
tokenA.lastIndex === tokenB.lastIndex
)
}

// Use the token to list entries against a target value.
Expand Down

0 comments on commit f8672f0

Please sign in to comment.