Skip to content

Commit

Permalink
streamline commas
Browse files Browse the repository at this point in the history
  • Loading branch information
nishasy committed Sep 26, 2024
1 parent 1003256 commit fddca1b
Showing 1 changed file with 2 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -72,13 +72,8 @@ const LockedVectorSettings = (props: Props) => {
str += "s";
}

for (let i = 0; i < labels.length; i++) {
// Separate additional labels with commas.
if (i > 0) {
str += ",";
}
str += ` ${labels[i].text}`;
}
// Separate additional labels with commas.
str += ` ${labels.map((l) => l.text).join(", ")}`;
}

return str;
Expand Down

0 comments on commit fddca1b

Please sign in to comment.