summaryrefslogtreecommitdiffstats
path: root/js/meals.js
diff options
context:
space:
mode:
Diffstat (limited to 'js/meals.js')
-rw-r--r--js/meals.js12
1 files changed, 7 insertions, 5 deletions
diff --git a/js/meals.js b/js/meals.js
index 097d799..ec810f3 100644
--- a/js/meals.js
+++ b/js/meals.js
@@ -263,11 +263,13 @@ async function setMenus(currentmeals = 69, toBeSentChoices) { // currentmeals je
return;
}
for(const [mealzzdate, mealzz] of Object.entries(currentmeals.data)) {
- for (const [mealid, mealdata] of Object.entries(mealzz.menu_options)) {
- console.log(mealdata);
- if(mealdata.selected == true || mealzz.readonly == true) {
- toBeSentChoices[mealzzdate] = mealdata.value;
- break;
+ if(mealzzdate in toBeSentChoices) {} else {
+ for (const [mealid, mealdata] of Object.entries(mealzz.menu_options)) {
+ console.log(mealdata);
+ if(mealdata.selected == true || mealzz.readonly == true) {
+ toBeSentChoices[mealzzdate] = mealdata.value;
+ break;
+ }
}
}
}