Quellcode durchsuchen

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

Lee Morgan vor 5 Jahren
Ursprung
Commit
372e7e0eeb
1 geänderte Dateien mit 1 neuen und 1 gelöschten Zeilen
  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){