You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The minicart promotion region was not rendering due to
a wrongly written check for the number of items in the
'promotion' region. The code checked for the length
property of the observable returned from the getRegion
method instead of the array it contained.
A fast way would have been to add the missing parentheses
to the check (and I made antoher PR doing just that), but
I felt that the getRegion(region)().length pattern is a
bit hard to read and easy to make a mistake with.
Therefore, this commit adds a new method to the
lib/core/collection.js component of the Magento_Ui module
that can be used to check if a region has any elements
associated with it. This commit also replaces all occurences
of getRegion(region)().length with a call to the new method.
0 commit comments