Skip to content

Commit

Permalink
Merge pull request #2 from mageho/patch-1
Browse files Browse the repository at this point in the history
Update navigator-mixin.js
  • Loading branch information
edward-simpson authored Nov 18, 2020
2 parents bd0bf8a + 4be2e94 commit c69563e
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/view/frontend/web/js/mixin/navigator-mixin.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,14 @@ define([
if (customer.isLoggedIn() && code === 'email') {
return;
}
var sortedItems = target.steps.sort(this.sortItems);
var sortedItems = target.steps().sort(this.sortItems);
if (!this.isProcessed(code)) {
return;
}

window.location = window.checkoutConfig.checkoutUrl + '#' + code;
sortedItems.forEach(function (element) {
element.isVisible(element.code === code);
element.isVisible(element.code == code); //eslint-disable-line eqeqeq
});
};

Expand All @@ -50,7 +50,7 @@ define([
return false;
}

isRequestedStepVisible = target.steps.sort(this.sortItems).some(function (element) {
isRequestedStepVisible = target.steps().sort(this.sortItems).some(function (element) {
return (element.code == hashString || element.alias == hashString) && element.isVisible(); //eslint-disable-line
});

Expand All @@ -59,7 +59,7 @@ define([
return false;
}

target.steps.sort(this.sortItems).forEach(function (element) {
target.steps().sort(this.sortItems).forEach(function (element) {
if (element.code == hashString || element.alias == hashString) { //eslint-disable-line eqeqeq
element.navigate(element);
} else {
Expand All @@ -73,4 +73,4 @@ define([

return target;
};
});
});

0 comments on commit c69563e

Please sign in to comment.