Skip to content

Commit

Permalink
Enable strict mode
Browse files Browse the repository at this point in the history
  • Loading branch information
odegroot committed May 28, 2017
1 parent 99b7759 commit efda94a
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions calc.jsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
"use strict";
/* global React,ReactDOM,ReactModal,App,_*/

ReactModal.setAppElement('#calc');
Expand Down Expand Up @@ -33,7 +34,7 @@ var Calc = React.createClass({
},

calculate: function() {

var inputs = _.map(this.getInputs(), function(input) {
return {recipe: input.recipe, ips: input.ipm / 60};
});
Expand Down Expand Up @@ -96,7 +97,7 @@ var Calc = React.createClass({
bulkVisible: false
}, this.calculate);
},

render: function() {
var results, subtotals;
if (this.state.result) {
Expand All @@ -105,7 +106,7 @@ var Calc = React.createClass({
return (<Ingredients key={recipe.name} req={recipe} ingredients="off" onRemove={recipe.name == self.state.input.recipe ? null : self.removeRecipe} alwaysShowDecimals={self.state.options.alwaysShowDecimals}/>);
});
subtotals = this.state.result.totals.map(function(total) {
return (<Ingredients key={total.name} req={total} ingredients="never" onExplain={self.explain} alwaysShowDecimals={self.state.options.alwaysShowDecimals}/>);
return (<Ingredients key={total.name} req={total} ingredients="never" onExplain={self.explain} alwaysShowDecimals={self.state.options.alwaysShowDecimals}/>);
});
}
var header = (
Expand All @@ -126,7 +127,7 @@ var Calc = React.createClass({
</div>
</div>
);

return (
<div className="wrapper">
<Datasource datalib={this.props.currentlib} datalibs={this.props.datalibs} />
Expand Down

0 comments on commit efda94a

Please sign in to comment.