mirror of
https://github.com/pretix/pretix.git
synced 2026-05-06 15:24:02 +00:00
Widget: Do not prefill field with 0
This commit is contained in:
@@ -229,7 +229,9 @@ Vue.component('availbox', {
|
||||
},
|
||||
amount_selected: {
|
||||
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) {
|
||||
// Unary operator to force boolean to integer conversion, as the HTML form submission
|
||||
|
||||
Reference in New Issue
Block a user