When adding a brand new tour, the user can add a friend to it before clicking "Add Tour". The tour was being deleted in the database when the button to add a friend was selected, leading to a potential null reference due to the friend trying to access the now nonexistent tour document.
When adding a brand new tour, the user can add a friend to it before clicking "Add Tour". The tour was being deleted in the database when the button to add a friend was selected, leading to a potential null reference due to the friend trying to access the now nonexistent tour document.