Fixed unreproducible edge case JS error when rescheduling chores (references #1938)

This commit is contained in:
Bernd Bestel 2022-07-09 09:00:15 +02:00
parent a85af22d6a
commit b57ba59243
No known key found for this signature in database
GPG Key ID: 71BD34C0D4891300

View File

@ -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")); 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()) 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) Grocy.Components.UserPicker.SetId(choreDetails.chore.next_execution_assigned_to_user_id)