forked from CGM_Public/pretix_original
Widget: Do not prefill field with 0
This commit is contained in:
@@ -229,7 +229,9 @@ Vue.component('availbox', {
|
|||||||
},
|
},
|
||||||
amount_selected: {
|
amount_selected: {
|
||||||
get: function () {
|
get: function () {
|
||||||
return this.item.has_variations ? this.variation.amount_selected : this.item.amount_selected
|
var selected = this.item.has_variations ? this.variation.amount_selected : this.item.amount_selected
|
||||||
|
if (selected === 0) return undefined;
|
||||||
|
return selected
|
||||||
},
|
},
|
||||||
set: function (value) {
|
set: function (value) {
|
||||||
// Unary operator to force boolean to integer conversion, as the HTML form submission
|
// Unary operator to force boolean to integer conversion, as the HTML form submission
|
||||||
|
|||||||
Reference in New Issue
Block a user