mirror of
https://github.com/naturalcrit/homebrewery.git
synced 2026-01-05 23:12:39 +00:00
Fix
This commit is contained in:
@@ -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();
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user