Explorar o código

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

Lee Morgan %!s(int64=5) %!d(string=hai) anos
pai
achega
372e7e0eeb
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  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){