π A self-hostable personal dashboard built for you. Includes status-checking, widgets, themes, icon packs, a UI editor and tons more!
Vue awesomedashboarddockerhomelabhomepagemitnodejsorganizationproductivitypwaself-hostedstartpagevue
π Fix putCommasInBigNum logic
Ruben Silvaeb06140fa49e
diff --git a/src/utils/MiscHelpers.js b/src/utils/MiscHelpers.jsindex e84b132f..fd34ada9 100644--- a/src/utils/MiscHelpers.js+++ b/src/utils/MiscHelpers.js@@ -75,7 +75,8 @@ export const getPlaceUrl = (placeName) => {/* Given a large number, will add commas to make more readable */export const putCommasInBigNum = (bigNum) => {const strNum = Number.isNaN(bigNum) ? bigNum : String(bigNum);- return strNum.replace(/\B(?=(?:\d{3})+(?!\d))/g, ',');+ const [integerPart, decimalPart] = strNum.split('.');+ return integerPart.replace(/\B(?=(\d{3})+(?!\d))/g, ',') + (decimalPart ? `.${decimalPart}` : '');};/* Given a large number, will convert 1000 into k for readability */