1
0

Fixed nutrients listing for absent quantity

This commit is contained in:
cryptogopher
2019-11-07 00:03:33 +01:00
parent 88e5cb430a
commit 8bad0b0b0f
2 changed files with 3 additions and 3 deletions

View File

@@ -54,7 +54,7 @@ class Ingredient < ActiveRecord::Base
q, deps = unchecked_q.shift
if q.formula.blank? || (nutrients[q.name].length == ingredients.count)
completed_q[q.name] = nutrients.delete(q.name)
completed_q[q.name] = nutrients.delete(q.name) || {}
next
end