Skip to content

Commit

Permalink
#18164 Checkout - Fix "Cannot read property 'code' on undefined" issue
Browse files Browse the repository at this point in the history
  • Loading branch information
ihor-sviziev authored Oct 10, 2018
1 parent e7f70ab commit 25e3cfe
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,16 +24,16 @@ define([

/** @inheritdoc */
initialize: function () {
var steps;
var stepsValue;

this._super();
$(window).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);
}
}

Expand Down

0 comments on commit 25e3cfe

Please sign in to comment.