Ensure fromRUB()
never returns value below 1
This commit is contained in:
parent
b5565f3901
commit
dfdf1d22db
@ -203,7 +203,7 @@ export class HandbookHelper
|
|||||||
|
|
||||||
// Get price of currency from handbook
|
// Get price of currency from handbook
|
||||||
const price = this.getTemplatePrice(currencyTypeTo);
|
const price = this.getTemplatePrice(currencyTypeTo);
|
||||||
return price ? Math.round(roubleCurrencyCount / price) : 0;
|
return price ? Math.max(1, Math.round(roubleCurrencyCount / price)) : 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
public getCategoryById(handbookId: string): Category
|
public getCategoryById(handbookId: string): Category
|
||||||
|
Loading…
Reference in New Issue
Block a user