Skip to content

Commit

Permalink
remove regex index reset in Duration.decode (#4348)
Browse files Browse the repository at this point in the history
  • Loading branch information
fubhy authored Jan 30, 2025
1 parent 6f1c3d7 commit fe0e4e8
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion packages/effect/src/Duration.ts
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,6 @@ export const decode = (input: DurationInput): Duration => {
return nanos(BigInt(input[0]) * bigint1e9 + BigInt(input[1]))
}
} else if (isString(input)) {
DURATION_REGEX.lastIndex = 0 // Reset the lastIndex before each use
const match = DURATION_REGEX.exec(input)
if (match) {
const [_, valueStr, unit] = match
Expand Down

0 comments on commit fe0e4e8

Please sign in to comment.