Skip to content

Commit

Permalink
Null coalescence on css/js to catch when file does not exists. (#2256)
Browse files Browse the repository at this point in the history
  • Loading branch information
ildyria authored Jan 29, 2024
1 parent f70e180 commit c559b8a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/Livewire/Components/Pages/Settings.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ class Settings extends Component
public function mount(): void
{
Gate::authorize(SettingsPolicy::CAN_EDIT, [Configs::class]);
$this->css = Storage::disk('dist')->get('user.css');
$this->js = Storage::disk('dist')->get('custom.js');
$this->css = Storage::disk('dist')->get('user.css') ?? '';
$this->js = Storage::disk('dist')->get('custom.js') ?? '';
}

/**
Expand Down

0 comments on commit c559b8a

Please sign in to comment.