0
0
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:
Rae Che
2018-05-27 13:58:11 +01:00
committed by Trevor Buckner
parent 730dde730c
commit 838b64c589

View File

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