We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents de50d12 + 0fcbe12 commit 35b1116Copy full SHA for 35b1116
app/code/Magento/Checkout/view/frontend/web/js/view/progress-bar.js
@@ -23,11 +23,17 @@ define([
23
24
/** @inheritdoc */
25
initialize: function () {
26
+ var stepsValue;
27
+
28
this._super();
29
window.addEventListener('hashchange', _.bind(stepNavigator.handleHash, stepNavigator));
30
31
if (!window.location.hash) {
- stepNavigator.setHash(stepNavigator.steps().sort(stepNavigator.sortItems)[0].code);
32
+ stepsValue = stepNavigator.steps();
33
34
+ if (stepsValue.length) {
35
+ stepNavigator.setHash(stepsValue.sort(stepNavigator.sortItems)[0].code);
36
+ }
37
}
38
39
stepNavigator.handleHash();
0 commit comments