mirror of
https://github.com/stolksdorf/homebrewery.git
synced 2025-12-15 22:26:01 +00:00
EditPage: Consistent trySave on handle[Metadata|Text]change
Previously, one of these happened in React's post-state-update callback, while the other happened directly. They now both use the callback.
This commit is contained in:
@@ -94,9 +94,7 @@ const EditPage = createClass({
|
||||
this.setState((prevState)=>({
|
||||
brew : _.merge({}, prevState.brew, metadata),
|
||||
isPending : true,
|
||||
}), ()=>{
|
||||
this.trySave();
|
||||
});
|
||||
}), ()=>this.trySave());
|
||||
|
||||
},
|
||||
|
||||
@@ -110,9 +108,7 @@ const EditPage = createClass({
|
||||
brew : _.merge({}, prevState.brew, { text: text }),
|
||||
isPending : true,
|
||||
htmlErrors : htmlErrors
|
||||
}));
|
||||
|
||||
this.trySave();
|
||||
}), ()=>this.trySave());
|
||||
},
|
||||
|
||||
hasChanges : function(){
|
||||
|
||||
Reference in New Issue
Block a user