You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It looks to me like the iterate function contains a bug. If one returns a segment to replace the old one from an Iterator function, every member of the new segment array is added individually to the segments array instead of adding it as a whole:
newSegments = [];
for (i = 0; i < segments.length; i++) {
if (typeof replacements[i] !== 'undefined') {
for (j = 0; j < replacements[i].length; j++) {
newSegments.push(replacements[i][j]);
}
} else {
newSegments.push(segments[i]);
}
}
this.segments = newSegments;
Should instead be:
newSegments = [];
for (i = 0; i < segments.length; i++) {
if (typeof replacements[i] !== 'undefined') {
newSegments.push(replacements[i]);
} else {
newSegments.push(segments[i]);
}
}
this.segments = newSegments;
in my opinion.
The text was updated successfully, but these errors were encountered:
It looks to me like the iterate function contains a bug. If one returns a segment to replace the old one from an Iterator function, every member of the new segment array is added individually to the segments array instead of adding it as a whole:
Should instead be:
in my opinion.
The text was updated successfully, but these errors were encountered: