Skip to content

Conversation

@azambon
Copy link

@azambon azambon commented Aug 4, 2020

We've noticed that in heavy-traffic situations the call to $block->getProduct() sometimes returns null (or false). When this happens, the line that sets the data-products attribute throws a fatal error.
In such situations it would be preferable not to show the powerstep popup if that means avoiding a fatal error.
Perhaps the product check could be incorporated in the shouldShow() method itself.

I also moved the line that retrieves the category id list inside the if() since this makes it safe to remove the product check from that line.

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.

1 participant