Skip to content

Commit

Permalink
fix: check if userId is null
Browse files Browse the repository at this point in the history
Signed-off-by: Andrés Maldonado <maldonado@codelutin.com>
  • Loading branch information
am97 committed Jul 3, 2024
1 parent 2ab5ee8 commit a123dc8
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/Service/CalendarInitialStateService.php
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,9 @@ public function run(): void {
$this->initialStateService->provideInitialState('tasks_enabled', $tasksEnabled);
$this->initialStateService->provideInitialState('hide_event_export', $hideEventExport);
$this->initialStateService->provideInitialState('force_event_alarm_type', $forceEventAlarmType);
$this->initialStateService->provideInitialState('appointmentConfigs', $this->appointmentConfigService->getAllAppointmentConfigurations($this->userId));
if (!is_null($this->userId)) {
$this->initialStateService->provideInitialState('appointmentConfigs', $this->appointmentConfigService->getAllAppointmentConfigurations($this->userId));
}
$this->initialStateService->provideInitialState('disable_appointments', $disableAppointments);
$this->initialStateService->provideInitialState('can_subscribe_link', $canSubscribeLink);
$this->initialStateService->provideInitialState('show_resources', $showResources);
Expand Down

0 comments on commit a123dc8

Please sign in to comment.