Item editor: Do not use only known props for diff (#6307)

Brooke the file seller plugin which adds a property and this did not detect the item change
This commit is contained in:
Andrew Camilleri 2024-10-16 14:25:06 +02:00 committed by GitHub
parent 755dbbab00
commit 2dc58a82b7
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -250,17 +250,10 @@ document.addEventListener('DOMContentLoaded', () => {
}, new Set()));
},
itemChanged() {
return this.selectedItem && this.selectedItemInitial && (
this.selectedItem.id !== this.selectedItemInitial.id ||
this.selectedItem.title !== this.selectedItemInitial.title ||
this.selectedItem.price !== this.selectedItemInitial.price ||
this.selectedItem.image !== this.selectedItemInitial.image ||
this.selectedItem.disabled !== this.selectedItemInitial.disabled ||
this.selectedItem.inventory !== this.selectedItemInitial.inventory ||
this.selectedItem.priceType !== this.selectedItemInitial.priceType ||
this.selectedItem.categories !== this.selectedItemInitial.categories ||
this.selectedItem.description !== this.selectedItemInitial.description
)
return (!this.selectedItem && this.selectedItemInitial) ||
(!this.selectedItem && this.selectedItemInitial) ||
(JSON.stringify(this.selectedItem) !== JSON.stringify(this.selectedItemInitial))
}
},
methods: {