File tree Expand file tree Collapse file tree 1 file changed +7
-5
lines changed
Expand file tree Collapse file tree 1 file changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -129,11 +129,13 @@ public static function getSharedProps()
129129
130130 $ subscription = $ user ? auth ()->user ()->subscription () : [];
131131
132- $ shared ['user ' ] = $ shared ['auth ' ]['user ' ] = array_merge ($ shared ['user ' ] ?? [], [
133- 'hasSubscription ' => !!$ subscription ,
134- 'subscription ' => $ subscription ,
135- 'isOnTrial ' => ($ subscription ['status ' ] ?? false ) === \Leaf \Billing \Subscription::STATUS_TRIAL ,
136- ]);
132+ if ($ user ) {
133+ $ shared ['user ' ] = $ shared ['auth ' ]['user ' ] = array_merge ($ shared ['user ' ] ?? [], [
134+ 'hasSubscription ' => !!$ subscription ,
135+ 'subscription ' => $ subscription ,
136+ 'isOnTrial ' => ($ subscription ['status ' ] ?? false ) === \Leaf \Billing \Subscription::STATUS_TRIAL ,
137+ ]);
138+ }
137139 }
138140 }
139141
You can’t perform that action at this time.
0 commit comments