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

[Backport] Checkout - Fix "Cannot read property 'code' on undefined" issue #18495

Conversation

ihor-sviziev
Copy link
Contributor

Original Pull Request

#18494

Description

After upgrading from 2.2.5 to 2.2.6 with module One Step Checkout module we started getting js error "Cannot read property 'code' of undefined".
Reason - this module removes all checkout "steps", but in Magento code there is no check that we have at least one step.

Fixed Issues (if relevant)

  1. Checkout - Cannot read property 'code' of undefined #18164: Checkout - Cannot read property 'code' of undefined
  2. Cannot read property 'code' of undefined mageplaza/m2-one-step-checkout-releases#3: Cannot read property 'code' of undefined

Manual testing scenarios

  1. Add to checkout page js component that will require 'Magento_Checkout/js/model/step-navigator'
  2. Add in it stepNavigator.steps.removeAll(); to remove all steps
  3. Go to checkout, look in console

Contribution checklist

  • Pull request has a meaningful description of its purpose
  • All commits are accompanied by meaningful commit messages
  • All new or changed code is covered with unit/integration tests (if applicable)
  • All automated tests passed successfully (all builds on Travis CI are green)

@magento-engcom-team
Copy link
Contributor

Hi @sidolov, thank you for the review.
ENGCOM-3154 has been created to process this Pull Request

@magento-engcom-team
Copy link
Contributor

Hi @ihor-sviziev. Thank you for your contribution.
We will aim to release these changes as part of 2.2.8.
Please check the release notes for final confirmation.

Please, consider to port this solution to 2.3 release line.
You may use Porting tool to port commits automatically.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants