Reorganise adding recipe to plan
Some checks failed
Build and Deploy / build-and-push (push) Failing after 21s
Some checks failed
Build and Deploy / build-and-push (push) Failing after 21s
This commit is contained in:
@@ -28,6 +28,9 @@ export function normalizeSlotValue(v) {
|
||||
id: x.id && String(x.id).length ? String(x.id) : newPlanEntryId(),
|
||||
recipeId: x.recipeId,
|
||||
servings: Math.max(1, Math.min(12, Number(x.servings) || 1)),
|
||||
...(x.substitutions && typeof x.substitutions === 'object' && !Array.isArray(x.substitutions) && Object.keys(x.substitutions).length > 0
|
||||
? { substitutions: { ...x.substitutions } }
|
||||
: {}),
|
||||
}));
|
||||
}
|
||||
if (typeof v === 'object' && v.recipeId && RECIPES[v.recipeId]) {
|
||||
@@ -35,6 +38,9 @@ export function normalizeSlotValue(v) {
|
||||
id: newPlanEntryId(),
|
||||
recipeId: v.recipeId,
|
||||
servings: Math.max(1, Math.min(12, Number(v.servings) || 1)),
|
||||
...(v.substitutions && typeof v.substitutions === 'object' && !Array.isArray(v.substitutions) && Object.keys(v.substitutions).length > 0
|
||||
? { substitutions: { ...v.substitutions } }
|
||||
: {}),
|
||||
}];
|
||||
}
|
||||
return [];
|
||||
|
||||
Reference in New Issue
Block a user