Skip to content
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

Merged
merged 4 commits into from
Oct 3, 2023
Merged

Fix issue with domain is null error #389

merged 4 commits into from
Oct 3, 2023

Conversation

lansami
Copy link
Collaborator

@lansami lansami commented Oct 3, 2023

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:

@aem-code-sync
Copy link

aem-code-sync bot commented Oct 3, 2023

Hello, I'm the AEM Code Sync Bot and I will run some test suites that validate the page speed.
In case there are problems, just click the checkbox below to rerun the respective action.

  • Re-run PSI Checks

@aem-code-sync
Copy link

aem-code-sync bot commented Oct 3, 2023

@aem-code-sync
Copy link

aem-code-sync bot commented Oct 3, 2023

@aem-code-sync
Copy link

aem-code-sync bot commented Oct 3, 2023

Page Scores Audits Google
/solutions/ PERFORMANCE A11Y SEO BEST PRACTICES SI FCP LCP TBT CLS PSI

@@ -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) {
Copy link
Collaborator

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)

Copy link
Collaborator Author

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) {
Copy link
Collaborator

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?

Copy link
Collaborator Author

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

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ack!

@aem-code-sync
Copy link

aem-code-sync bot commented Oct 3, 2023

Page Scores Audits Google
/solutions/ PERFORMANCE A11Y SEO BEST PRACTICES SI FCP LCP TBT CLS PSI

@aem-code-sync
Copy link

aem-code-sync bot commented Oct 3, 2023

Page Scores Audits Google
/solutions/ PERFORMANCE A11Y SEO BEST PRACTICES SI FCP LCP TBT CLS PSI

@basecode basecode merged commit 1c3f85d into main Oct 3, 2023
3 checks passed
@basecode basecode deleted the issue-388 branch October 3, 2023 10:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Block library not rendering due to JS error
3 participants