Browse Source

fix: build error

KernelDeimos 3 ngày trước cách đây
mục cha
commit
5f14dc720b
1 tập tin đã thay đổi với 2 bổ sung2 xóa
  1. 2 2
      src/gui/src/helpers.js

+ 2 - 2
src/gui/src/helpers.js

@@ -2733,8 +2733,8 @@ window.get_profile_picture = async function(username){
 window.format_with_units = (num, { mulUnits, divUnits, precision = 3 }) => {
   if ( num === 0 ) return "0";
 
-  const mulUnits = ["", "K", "M", "G", "T", "P", "E", "Z", "Y"];
-  const divUnits = ["m", "µ", "n", "p", "f", "a", "z", "y"];
+  mulUnits = mulUnits ?? ["", "K", "M", "G", "T", "P", "E", "Z", "Y"];
+  divUnits = divUnits ?? ["m", "µ", "n", "p", "f", "a", "z", "y"];
 
   const abs = Math.abs(num);
   let exp = Math.floor(Math.log10(abs) / 3);