Ignore empty partials coming from dynamic sources #149
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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:
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:
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.