diff --git a/src/business.js b/src/business.js index a8f0cd0..247232d 100644 --- a/src/business.js +++ b/src/business.js @@ -18,7 +18,7 @@ function totalCart(items) { function normalizeUsername(username) { // BUG: replaces only the first space and does not collapse repeated whitespace. - return username.trim().toLowerCase().replace(' ', '-'); + return username.trim().toLowerCase().replace(/\s+/g, '-'); } function estimateShipping(weightKg, expedited = false) {