set mainUser event if not set before

This commit is contained in:
Julien Fastré 2022-05-23 22:50:33 +02:00
parent a5998ce99d
commit 00e87f8c75

View File

@ -139,7 +139,7 @@ export default {
let calendarRangeInput = document.getElementById("chill_activitybundle_activity_calendarRange");
calendarRangeInput.value = "";
if (getters.getMainUser !== null && getters.getMainUser.id !== state.me.id) {
if (getters.getMainUser === null || getters.getMainUser.id !== state.me.id) {
let mainUserInput = document.getElementById("chill_activitybundle_activity_mainUser");
mainUserInput.value = state.me.id;
commit('setMainUser', state.me);