fix: correct images field to be array in recipe creation
All checks were successful
CI / update (push) Successful in 2m49s
All checks were successful
CI / update (push) Successful in 2m49s
The images field was incorrectly set as a single object instead of an array, causing translation to fail with 'images.forEach is not a function' error. Also added defensive Array.isArray check in translation service.
This commit is contained in:
@@ -108,7 +108,7 @@
|
||||
return {
|
||||
...card_data,
|
||||
...add_info,
|
||||
images: {mediapath: short_name.trim() + '.webp', alt: "", caption: ""},
|
||||
images: [{mediapath: short_name.trim() + '.webp', alt: "", caption: ""}],
|
||||
season: season_local,
|
||||
short_name : short_name.trim(),
|
||||
portions: portions_local,
|
||||
|
||||
Reference in New Issue
Block a user