1
0
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:
Rae Che
2018-05-27 12:36:30 +01:00
committed by Trevor Buckner
parent 761597e71f
commit d867aa7ce1

View File

@@ -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(){