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

Ignore empty partials coming from dynamic sources #149

Merged
merged 1 commit into from
Oct 18, 2024

Conversation

krzksz
Copy link
Contributor

@krzksz krzksz commented Oct 10, 2024

What issue does this pull request address?

So I finally managed to reproduce a recent situation where I'm getting the The page cannot be profiled error.
During the investigation, I noticed the following error in extension's devtools:
image

The issue occurs when a certain page uses a dynamic source in one of the rich text areas. Here I set up an example product page on my test store (password: pierogi), which references the product's vendor.

It triggers the error, because its entry contains only a code snippet:
image
so the const nameParts = entry.partial.split('/'); part fails.

What is the solution

I don't think showing a dynamic source entry on the flamechart would be actionable. Also, the parent that renders it still included properly.

That's why I decided to skip any entries that don't have the .partial defined, which fixes the issue.

What should the reviewer focus on and are there any special considerations?

Fixes #121, fixes #137, fixes #138, fixes #139, fixes #140.

@krzksz krzksz requested a review from mgmanzella October 10, 2024 18:46
Copy link
Contributor

@mgmanzella mgmanzella left a comment

Choose a reason for hiding this comment

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

tophatting looks great thank you!

@mgmanzella mgmanzella merged commit 557f95e into master Oct 18, 2024
1 check passed
@mgmanzella mgmanzella deleted the ignore-dynamic-sources branch October 18, 2024 18:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants