ソースを参照

Bug fix: ingredients on home strand were being sorted on the wrong property.

Lee Morgan 5 年 前
コミット
372e7e0eeb
1 ファイル変更1 行追加1 行削除
  1. 1 1
      views/dashboardPage/js/strands/home.js

+ 1 - 1
views/dashboardPage/js/strands/home.js

@@ -62,7 +62,7 @@ let home = {
             });
         }
 
-        ingredients.sort((a, b) => (a.unitCost > b.unitCost) ? -1 : 1);
+        ingredients.sort((a, b) => (a.totalCost > b.totalCost) ? -1 : 1);
         let container = document.getElementById("mostUsedBody");
 
         while(container.children.length > 0){