Skip to content

A free open source IT asset/license management system

Fix webhook selected value in mount method

Marcus Moored6b69c8cc22f
diff --git a/app/Livewire/SlackSettingsForm.php b/app/Livewire/SlackSettingsForm.php
index 694de89a82..535a83413f 100644
--- a/app/Livewire/SlackSettingsForm.php
+++ b/app/Livewire/SlackSettingsForm.php
@@ -71,7 +71,7 @@ class SlackSettingsForm extends Component
$this->setting = Setting::getSettings();
$this->save_button = trans('general.save');
- $this->webhook_selected = $this->setting->webhook_selected ?? 'slack';
+ $this->webhook_selected = ($this->setting->webhook_selected !== '') ? $this->setting->webhook_selected : 'slack';
$this->webhook_name = $this->webhook_text[$this->setting->webhook_selected]["name"] ?? $this->webhook_text['slack']["name"];
$this->webhook_icon = $this->webhook_text[$this->setting->webhook_selected]["icon"] ?? $this->webhook_text['slack']["icon"];
$this->webhook_placeholder = $this->webhook_text[$this->setting->webhook_selected]["placeholder"] ?? $this->webhook_text['slack']["placeholder"];