mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-11-29 15:12:58 +03:00
Fixed broken notification state in case of missing member
no issue - Notification was fetching member's first name which caused error in case the member was not logged in - Adds check for member to exist before fetching first name
This commit is contained in:
parent
28ed0fb632
commit
11746c1df7
@ -29,8 +29,9 @@ const Styles = () => {
|
||||
const NotificationText = ({type, status, context}) => {
|
||||
const signinPortalLink = getPortalLink({page: 'signin', siteUrl: context.site.url});
|
||||
const singupPortalLink = getPortalLink({page: 'signup', siteUrl: context.site.url});
|
||||
const firstname = context.member.firstname;
|
||||
if (type === 'signin' && status === 'success') {
|
||||
|
||||
if (type === 'signin' && status === 'success' && context.member) {
|
||||
const firstname = context.member.firstname || '';
|
||||
return (
|
||||
<p>
|
||||
Welcome back{(firstname ? ', ' + firstname : '')}!<br />You've successfully signed in.
|
||||
|
Loading…
Reference in New Issue
Block a user