Skip to content

Commit

Permalink
Fix regression introduced by adding decimal option
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrew Brindamour committed May 5, 2017
1 parent 7531005 commit 04f5a4d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion ingredients.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,11 @@ var Ingredients = React.createClass({
render: function() {
var inputs, details;
if (this.props.req.ingredients && this.props.req.ingredients.length && (this.state.showIngredients || this.props.ingredients=="always")) {
var self = this;
inputs = (
<div className="inputs">
{this.props.req.ingredients.map(function(ingredient){
return <Ingredients key={ingredient.recipe.name} req={ingredient.recipe} ingredients="off" alwaysShowDecimals={this.props.alwaysShowDecimals}/>;
return <Ingredients key={ingredient.recipe.name} req={ingredient.recipe} ingredients="off" alwaysShowDecimals={self.props.alwaysShowDecimals}/>;
})}
</div>
);
Expand Down

0 comments on commit 04f5a4d

Please sign in to comment.