From 0fcbe126eff6cc5268268ec1154a261d49369152 Mon Sep 17 00:00:00 2001 From: Ihor Sviziev Date: Wed, 10 Oct 2018 11:55:29 +0300 Subject: [PATCH] magento/magento2#18164 Checkout - Fix "Cannot read property 'code' on undefined" issue --- .../Checkout/view/frontend/web/js/view/progress-bar.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/app/code/Magento/Checkout/view/frontend/web/js/view/progress-bar.js b/app/code/Magento/Checkout/view/frontend/web/js/view/progress-bar.js index b9233c8b702d9..30ea9da1dd601 100644 --- a/app/code/Magento/Checkout/view/frontend/web/js/view/progress-bar.js +++ b/app/code/Magento/Checkout/view/frontend/web/js/view/progress-bar.js @@ -23,16 +23,16 @@ define([ /** @inheritdoc */ initialize: function () { - var steps; + var stepsValue; this._super(); window.addEventListener('hashchange', _.bind(stepNavigator.handleHash, stepNavigator)); if (!window.location.hash) { - steps = stepNavigator.steps(); + stepsValue = stepNavigator.steps(); - if (steps.length) { - stepNavigator.setHash(steps.sort(stepNavigator.sortItems)[0].code); + if (stepsValue.length) { + stepNavigator.setHash(stepsValue.sort(stepNavigator.sortItems)[0].code); } }