Fixed add price not erroring on empty amount

refs https://github.com/TryGhost/Team/issues/641

Updated error handling for empty amount on price modal
This commit is contained in:
Rishabh 2021-05-11 00:18:45 +05:30
parent d3ac517056
commit 2862d68f99

View File

@ -107,7 +107,7 @@ export default class ModalProductPrice extends ModalBase {
message: 'Please enter name' message: 'Please enter name'
}]); }]);
} }
if (isNaN(this.price.amount)) { if (isNaN(this.price.amount) || this.price.amount === '') {
this.errors.set('amount', [{ this.errors.set('amount', [{
message: 'Please enter amount' message: 'Please enter amount'
}]); }]);