Skip to content

Commit

Permalink
refactor: remove variable
Browse files Browse the repository at this point in the history
  • Loading branch information
aleclarson committed Jul 2, 2024
1 parent 7687ff6 commit b9bf8ab
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/array/replace.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,7 @@ export function replace<T>(
}
const out = array.slice()
for (let index = 0; index < array.length; index++) {
const item = array[index]
if (match(item, index)) {
if (match(array[index], index)) {
out[index] = newItem
break
}
Expand Down

0 comments on commit b9bf8ab

Please sign in to comment.