Skip to content

Commit 25e3cfe

Browse files
authored
#18164 Checkout - Fix "Cannot read property 'code' on undefined" issue
1 parent e7f70ab commit 25e3cfe

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
@@ -24,16 +24,16 @@ define([
2424

2525
/** @inheritdoc */
2626
initialize: function () {
27-
var steps;
27+
var stepsValue;
2828

2929
this._super();
3030
$(window).hashchange(_.bind(stepNavigator.handleHash, stepNavigator));
3131

3232
if (!window.location.hash) {
33-
steps = stepNavigator.steps();
33+
stepsValue = stepNavigator.steps();
3434

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

0 commit comments

Comments
 (0)