From 4913451949528cf818087cde0a5070c9a0f0361d Mon Sep 17 00:00:00 2001 From: PascalBrouwers Date: Mon, 6 May 2019 16:51:21 +0200 Subject: [PATCH] Fix skipping shipping step when logged in See https://github.com/danslo/CleanCheckoutTheme/issues/3 --- src/view/frontend/web/js/view/email.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/view/frontend/web/js/view/email.js b/src/view/frontend/web/js/view/email.js index 14008f0..0493175 100644 --- a/src/view/frontend/web/js/view/email.js +++ b/src/view/frontend/web/js/view/email.js @@ -49,11 +49,13 @@ define([ }, navigateToNextStep: function () { - if (this.validateEmail()) { + var currentStep = stepNavigator.getActiveItemIndex(); + + if (this.validateEmail() && stepNavigator.steps()[currentStep].code == 'email') { stepNavigator.next(); } else { $(this.loginFormSelector + ' input[name=username]').focus(); } } }); -}); \ No newline at end of file +});