Skip to content

Commit

Permalink
Bugfix. Use index passed to reducer.
Browse files Browse the repository at this point in the history
  • Loading branch information
jcbrand committed Jan 4, 2025
1 parent 9b643a4 commit b4f3369
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/stanza.js
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,7 @@ export class Stanza extends Builder {
this.#string =
this.#string ||
this.#strings
.reduce((acc, str) => {
const idx = this.#strings.indexOf(str);
.reduce((acc, str, idx) => {
const value = this.#values.length > idx ? this.#values[idx] : '';
return (
acc +
Expand Down

0 comments on commit b4f3369

Please sign in to comment.