Fix a bug when a recipe does not have any instructions
This commit is contained in:
parent
40fbc5b662
commit
6fad7bec13
@ -16,9 +16,9 @@ function _postProcessRecipes(response) {
|
||||
parsed.recipes = parsed.recipes.map(item => Object.assign(
|
||||
item,
|
||||
{
|
||||
instructions: item.instructions.split(/[\r\n]\n/).map(
|
||||
instructions: item.instructions ? item.instructions.split(/[\r\n]\n/).map(
|
||||
line => line.trim(),
|
||||
),
|
||||
) : [],
|
||||
},
|
||||
));
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user