Showing
1 changed file
with
1 additions
and
1 deletions
| @@ -869,7 +869,7 @@ Page({ | @@ -869,7 +869,7 @@ Page({ | ||
| 869 | let result = {}; | 869 | let result = {}; |
| 870 | let maxPrice = -Infinity; | 870 | let maxPrice = -Infinity; |
| 871 | for (let i = 0; i < arr.length; i++) { | 871 | for (let i = 0; i < arr.length; i++) { |
| 872 | - const price = parseInt(arr[i].price, 10); | 872 | + const price = parseFloat(arr[i].price, 10); |
| 873 | if (price <= num && price > maxPrice) { | 873 | if (price <= num && price > maxPrice) { |
| 874 | maxPrice = price; | 874 | maxPrice = price; |
| 875 | result = arr[i]; | 875 | result = arr[i]; |
-
Please register or login to post a comment