Add null check

This commit is contained in:
Thijmen Stavenuiter 2024-06-22 10:30:40 +02:00
parent cdabdb4558
commit 4acdd8df12

View File

@ -19,7 +19,11 @@
@php
$instanceSettings = InstanceSettings::first();
$name = strlen($instanceSettings->instance_name) > 0 ? "[{$instanceSettings->instance_name}] " : '';
$name = null;
if($instanceSettings) {
$name = strlen($instanceSettings->instance_name) > 0 ? "[{$instanceSettings->instance_name}] " : '';
}
@endphp
<title>{{ $name }}{{ $title ?? 'Coolify' }}</title>
@env('local')