Fixed extra comma on stringified items.

This commit is contained in:
Harrison Deng 2022-04-05 03:30:59 -05:00
parent c1589b9758
commit d17fe1d912

View File

@ -10,7 +10,9 @@ export function grammaticalListString(items, max) {
return; return;
} }
built += item; built += item;
built += ", "; if (index < items.length - 1) {
built += ", ";
}
if (index == max - 1) { if (index == max - 1) {
built += "and "; built += "and ";
} }