From b57ba59243aa667114d6cb67ff43ff5cb175cacc Mon Sep 17 00:00:00 2001 From: Bernd Bestel Date: Sat, 9 Jul 2022 09:00:15 +0200 Subject: [PATCH] Fixed unreproducible edge case JS error when rescheduling chores (references #1938) --- public/viewjs/choresoverview.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/public/viewjs/choresoverview.js b/public/viewjs/choresoverview.js index 64d40b1b..c083a0d5 100644 --- a/public/viewjs/choresoverview.js +++ b/public/viewjs/choresoverview.js @@ -307,6 +307,10 @@ $(document).on("click", ".reschedule-chore-button", function(e) Grocy.Components.DateTimePicker.SetValue(moment(prefillDate).format("YYYY-MM-DD HH:mm:ss")); } + if (typeof choreDetails.chore.next_execution_assigned_to_user_id != "string") + { + choreDetails.chore.next_execution_assigned_to_user_id = ""; + } if (choreDetails.chore.next_execution_assigned_to_user_id != null && !choreDetails.chore.next_execution_assigned_to_user_id.isEmpty()) { Grocy.Components.UserPicker.SetId(choreDetails.chore.next_execution_assigned_to_user_id)