ComputritionApiRequest::getMenu() array of recipes is incorrectly formatted if the list only contains a single item

Created on 13 April 2023, over 1 year ago
Updated 27 April 2023, over 1 year ago

Problem/Motivation

The list of recipes returned should just be a zero-indexed array of arrays, each representing a recipe in computrition. However, if the returned list from the API only contains a single recipe, then the entire array just represents that one recipe and it is no longer zero-indexed.

Proposed resolution

Fix it such that the case of a recipe list with a single recipe in it is consistent with a recipe list with multiple items.

πŸ› Bug report
Status

Fixed

Version

1.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States Fernando Iglesias

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024