mirror of
https://github.com/naturalcrit/homebrewery.git
synced 2026-01-11 02:32:41 +00:00
EditPage: Simplify hasChanges.
In particular, remove unreachable `return` statement.
This commit is contained in:
@@ -112,12 +112,8 @@ const EditPage = createClass({
|
|||||||
},
|
},
|
||||||
|
|
||||||
hasChanges : function(){
|
hasChanges : function(){
|
||||||
if(this.savedBrew){
|
const savedBrew = this.savedBrew ? this.savedBrew : this.props.brew;
|
||||||
return !_.isEqual(this.state.brew, this.savedBrew);
|
return !_.isEqual(this.state.brew, savedBrew);
|
||||||
} else {
|
|
||||||
return !_.isEqual(this.state.brew, this.props.brew);
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
},
|
},
|
||||||
|
|
||||||
trySave : function(){
|
trySave : function(){
|
||||||
|
|||||||
Reference in New Issue
Block a user