From 47d60ad86af9f9be3d75749e0a53e7689a768603 Mon Sep 17 00:00:00 2001 From: RaceProUK Date: Tue, 24 Mar 2015 22:36:54 +0000 Subject: [PATCH] Swapped order of checks --- app/assets/javascripts/discourse/lib/formatter.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/assets/javascripts/discourse/lib/formatter.js b/app/assets/javascripts/discourse/lib/formatter.js index 086ad750789..f2063e3786f 100644 --- a/app/assets/javascripts/discourse/lib/formatter.js +++ b/app/assets/javascripts/discourse/lib/formatter.js @@ -261,12 +261,12 @@ var number = function(val) { val = parseInt(val, 10); if (isNaN(val)) val = 0; - if (val > 999) { - return (val / 1000).toFixed(1) + "K"; - } if (val > 999999) { return (val / 1000000).toFixed(1) + "M"; } + if (val > 999) { + return (val / 1000).toFixed(1) + "K"; + } return val.toString(); };