0
0
mirror of https://github.com/naturalcrit/homebrewery.git synced 2026-01-05 23:12:39 +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){ trySave : function(immediate=false){
if(!this.debounceSave) this.debounceSave = _.debounce(this.save, SAVE_TIMEOUT); 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(); this.debounceSave();
} else { else
this.debounceSave.cancel(); this.debounceSave.cancel();
}
if(immediate) this.debounceSave.flush(); if(immediate) this.debounceSave.flush();
}, },