diff --git a/src/business.js b/src/business.js index a8f0cd0..04a43aa 100644 --- a/src/business.js +++ b/src/business.js @@ -17,8 +17,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) {