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

Add type check to getConfigurationMatchLevel to prevent type exception #4216

Conversation

cewald
Copy link
Contributor

@cewald cewald commented Apr 2, 2020

Related Issues

This related to the changes of #4042 & #3939.

There are use-cases where the variant properties are null. E.g. if you load a configurable product using the product/loadProduct action without specifying a specific variant. The current, new getConfigurationMatchLevel method will drop an TypeError: Cannot read property 'id' of null exception.

I extended the method to support this behavior.

Short Description and Why It's Useful

Just in-case, prevent this error.

Which Environment This Relates To

Check your case. In case of any doubts please read about Release Cycle

  • Test version (https://test.storefrontcloud.io) - this is a new feature or improvement for Vue Storefront. I've created branch from develop branch and want to merge it back to develop
  • RC version (https://next.storefrontcloud.io) - this is a stabilisation fix for Release Candidate of Vue Storefront. I've created branch from release branch and want to merge it back to release
  • Stable version (https://demo.storefrontcloud.io) - this is an important fix for current stable version. I've created branch from hotfix or master branch and want to merge it back to hotfix

Upgrade Notes and Changelog

  • No upgrade steps required (100% backward compatibility and no breaking changes)
  • I've updated the Upgrade notes and Changelog on how to port existing Vue Storefront sites with this new feature

IMPORTANT NOTICE - Remember to update CHANGELOG.md with description of your change

Contribution and Currently Important Rules Acceptance

@andrzejewsky andrzejewsky merged commit 3ff48b1 into vuestorefront:develop Apr 3, 2020
@cewald cewald deleted the bugfix/type-check-for-product-setup-matching branch April 3, 2020 17:10
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.

None yet

3 participants