This commit is contained in:
Kukks 2023-07-28 17:26:16 +02:00
parent c0ffab768a
commit 9132592717
No known key found for this signature in database
GPG Key ID: 8E5530D9D1C93097

View File

@ -234,7 +234,7 @@ document.addEventListener("DOMContentLoaded", () => {
this.setEditingItem(null, { id: '', title: '', price: 0, image: '', description: '', categories: [], priceType: 'Fixed', inventory: null, disabled: false });
},
editItem(index) {
this.setEditingItem(index, Object.assign({}, this.config[index]));
this.setEditingItem(index, Object.assign({ id: '', title: '', price: 0, image: '', description: '', categories: [], priceType: 'Fixed', inventory: null, disabled: false }, this.config[index]));
},
saveItem() {
// set id from title if not set