mirror of
https://github.com/aljazceru/btcpayserver.git
synced 2025-12-30 04:04:21 +01:00
Fix for crowdfund perk editor
With no title entered, the editor got stuck in an endless loop, because it recursively invoked the save function without checking for the ID fallback being present. Fixes #2862.
This commit is contained in:
committed by
Andrew Camilleri
parent
de2c12c1df
commit
435f51a777
@@ -340,8 +340,9 @@ document.addEventListener("DOMContentLoaded", function () {
|
||||
return this.errors.length === 0;
|
||||
},
|
||||
saveEditingItem: function(){
|
||||
if(!this.editingItem.id){
|
||||
this.editingItem.id = this.editingItem.title.toLowerCase().trim();
|
||||
const fallbackId = this.editingItem.title.toLowerCase().trim();
|
||||
if(!this.editingItem.id && fallbackId){
|
||||
this.editingItem.id = fallbackId;
|
||||
this.$nextTick(this.saveEditingItem.bind(this));
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user