Просмотр исходного кода

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

Lee Morgan 5 лет назад
Родитель
Сommit
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");
         let container = document.getElementById("mostUsedBody");
 
 
         while(container.children.length > 0){
         while(container.children.length > 0){