From 4be2e9464a34c60e147226fba78b62607c6cbc4d Mon Sep 17 00:00:00 2001 From: Ilan Parmentier Date: Tue, 12 Feb 2019 12:24:39 +0100 Subject: [PATCH] Update navigator-mixin.js steps is an observable knockout array; and knockout did some change on it behaviour function to return the `observableArray` instead of the `Array` (https://github.com/knockout/knockout/pull/1380) https://github.com/magento/magento2/blob/0eb8677b0b4e35606032e856cc1ef7c80e68829f/app/code/Magento/Checkout/view/frontend/web/js/model/step-navigator.js#L15 This pull request modify calling variable steps. due to the core change in Magento_Checkout : 216b595d69f601019779ca57e446d7c904f89175 --- src/view/frontend/web/js/mixin/navigator-mixin.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/view/frontend/web/js/mixin/navigator-mixin.js b/src/view/frontend/web/js/mixin/navigator-mixin.js index f0414a1..da9d061 100644 --- a/src/view/frontend/web/js/mixin/navigator-mixin.js +++ b/src/view/frontend/web/js/mixin/navigator-mixin.js @@ -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 }); }; @@ -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 }); @@ -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 { @@ -73,4 +73,4 @@ define([ return target; }; -}); \ No newline at end of file +});