Closed jayaddison closed 4 years ago
Confirmed by adding a browser development mode breakpoint here: https://github.com/openculinary/frontend/blob/46893aebfec6dea9d1bccf274051f70c06747e8f/src/app/views/shopping-list.js#L112 - the value of servings.scheduled
was the string value "01212"
, and this was being used as the multiplication value.
Describe the bug Under some circumstances shopping list quantities are currently being calculated correctly.
It's possible that this is a type-casting issue; this is based on an observation that the example recipe below yields
12
servings, and the totals appear to be a multiple of100x
the original quantity =>12 + 12 = 24
, but"12+12" = "1212"
, and1212 / 12 ~= 100
.To Reproduce Steps to reproduce the behavior: