0
0
mirror of https://github.com/naturalcrit/homebrewery.git synced 2025-12-24 20:42:43 +00:00
This commit is contained in:
Trevor Buckner
2025-07-07 19:26:03 +00:00
parent eb7fbbe018
commit 43095507ee

View File

@@ -197,11 +197,14 @@ const EditPage = createClass({
trySave : function(immediate=false){
if(!this.debounceSave) this.debounceSave = _.debounce(this.save, SAVE_TIMEOUT);
if(this.hasChanges() && !this.state.isSaving){
if(this.state.isSaving)
return;
if(this.hasChanges())
this.debounceSave();
} else {
else
this.debounceSave.cancel();
}
if(immediate) this.debounceSave.flush();
},