Skip to content

Commit 0fcbe12

Browse files
authored
#18164 Checkout - Fix "Cannot read property 'code' on undefined" issue
1 parent 47978d7 commit 0fcbe12

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

app/code/Magento/Checkout/view/frontend/web/js/view/progress-bar.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,16 +23,16 @@ define([
2323

2424
/** @inheritdoc */
2525
initialize: function () {
26-
var steps;
26+
var stepsValue;
2727

2828
this._super();
2929
window.addEventListener('hashchange', _.bind(stepNavigator.handleHash, stepNavigator));
3030

3131
if (!window.location.hash) {
32-
steps = stepNavigator.steps();
32+
stepsValue = stepNavigator.steps();
3333

34-
if (steps.length) {
35-
stepNavigator.setHash(steps.sort(stepNavigator.sortItems)[0].code);
34+
if (stepsValue.length) {
35+
stepNavigator.setHash(stepsValue.sort(stepNavigator.sortItems)[0].code);
3636
}
3737
}
3838

0 commit comments

Comments
 (0)