fix panic on empty notification content

This commit is contained in:
Pig Fang 2021-02-17 22:40:02 +08:00
parent de1f596401
commit 1db946e372
No known key found for this signature in database
GPG Key ID: A8198F548DADA9E2

View File

@ -65,7 +65,7 @@ class NotificationsController extends Controller
return [
'title' => $notification->data['title'],
'content' => $converter->convertToHtml($notification->data['content']),
'content' => $converter->convertToHtml($notification->data['content'] ?? ''),
'time' => $notification->created_at->toDateTimeString(),
];
}