Fix crash
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
2022-07-06 19:43:44 +03:00
parent 148a3693b9
commit 1af1048670

View File

@@ -10,6 +10,10 @@ module.exports = class Part {
async getPrice () { async getPrice () {
const orders = await Api.getSortedOrders(this.urlPath) const orders = await Api.getSortedOrders(this.urlPath)
if (orders.length === 0) {
return 0
}
return Number(orders[0].platinum) * this.amount return Number(orders[0].platinum) * this.amount
} }
} }