-
Notifications
You must be signed in to change notification settings - Fork 7
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
Fix issue with domain is null error #389
Conversation
Hello, I'm the AEM Code Sync Bot and I will run some test suites that validate the page speed.
|
|
|
|
scripts/breadcrumbs.js
Outdated
@@ -86,7 +86,7 @@ export async function loadBreadcrumbs() { | |||
decorateBlockWithRegionId(breadcrumb, 'Hero|Breadcrumb'); | |||
|
|||
// check if breadcrumb div exists | |||
if (breadcrumb !== undefined) { | |||
if (breadcrumb !== undefined && breadcrumb !== null) { |
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.
Can we simplify and catch all "nullish" values? -> if (breadcrumb)
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 reverted this, I saw that there is another PR that has this change
@@ -362,6 +362,10 @@ function getDomainInfo(hostname) { | |||
|
|||
function pushPageLoadToDataLayer() { | |||
const { hostname } = window.location; | |||
if (!hostname) { |
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 expect the hostname to be not null. Rather main--bitdefender--hlxsites.hlx.page
?
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.
in case of sidekick, when loading the page, the window.localtion.hostname
is an empty string
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.
ack!
|
|
Please always provide the GitHub issue(s) your PR is for, as well as test URLs where your change can be observed (before and after):
Fix #388
Test URLs: