From a62cd2b52b5a2577487c2d496f63680901e10638 Mon Sep 17 00:00:00 2001 From: Lui Yong Sheng <13586871+luiyongsheng@users.noreply.github.com> Date: Sat, 2 Jan 2021 11:06:44 +0800 Subject: [PATCH] Update ShareInertiaData.php --- src/Http/Middleware/ShareInertiaData.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Http/Middleware/ShareInertiaData.php b/src/Http/Middleware/ShareInertiaData.php index 4f1d3842..625d1ec1 100644 --- a/src/Http/Middleware/ShareInertiaData.php +++ b/src/Http/Middleware/ShareInertiaData.php @@ -22,7 +22,7 @@ public function handle($request, $next) 'show' => Socialstream::show(), 'providers' => Socialstream::providers(), 'hasPassword' => $request->user() && ! is_null($request->user()->password), - 'connectedAccounts' => $request->user() && $request->user()->connectedAccounts, + 'connectedAccounts' => $request->user() ? $request->user()->connectedAccounts : [], ]; }, ]));