From 71b68056216e779eed1bc1fb6351c28763b5eaff Mon Sep 17 00:00:00 2001 From: dbroqua Date: Thu, 11 Apr 2019 13:39:30 +0200 Subject: [PATCH] Fixed --- middleware/VegetableTypes.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/middleware/VegetableTypes.js b/middleware/VegetableTypes.js index cf8596e..b1e5963 100644 --- a/middleware/VegetableTypes.js +++ b/middleware/VegetableTypes.js @@ -30,7 +30,7 @@ class VegetableTypes { for (let j = 0; j < type.Vegetables.length; j += 1) { let k = 0 for (k = 0; k < vegetables.length; k += 1) { - if (type.Vegetables[j].name < vegetables[k].name) { + if (type.Vegetables[j].name.localeCompare(vegetables[k].name) === 1) { console.log('Break at:', k) break }