-
Notifications
You must be signed in to change notification settings - Fork 13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Updated Page Title #1223
Updated Page Title #1223
Conversation
</Helmet> | ||
); | ||
}) => { | ||
const isHomePage = location.pathname === '/'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I feel this might need an ? as location might be undefined during build
const isHomePage = location.pathname === '/'; | |
const isHomePage = location?.pathname === '/'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
well I guess it did build in staging... so maybe disregard these :P
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, the location
is populated by Gatsby, so it should be present during build 🙂
}; | ||
|
||
const pageTitleFull = setFullTitle(); | ||
const canonical = parentSiteUrl + (location.pathname || ''); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
const canonical = parentSiteUrl + (location.pathname || ''); | |
const canonical = parentSiteUrl + (location?.pathname || ''); |
same with here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good 🚀
Relates to #1159
Change: