Merge pull request #499 from wynn-dev/main

Fix product sorting issues
This commit is contained in:
Dennis 2022-08-01 22:54:03 +02:00 committed by GitHub
commit 8c1381ffbb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -350,7 +350,7 @@
this.fetchedProducts = true;
// TODO: Sortable by user chosen property (cpu, ram, disk...)
this.products = response.data.sort((p1, p2) => p1.price > p2.price && 1 || -1)
this.products = response.data.sort((p1, p2) => parseInt(p1.price,10) > parseInt(p2.price,10) && 1 || -1)
//divide cpu by 100 for each product
this.products.forEach(product => {