File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed
app/code/Magento/Checkout/view/frontend/web/js/model Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -28,9 +28,7 @@ define([
2828 message : $t ( 'You are not authorized to access this resource.' )
2929 } ;
3030 messageContainer . addErrorMessage ( error ) ;
31- setTimeout ( ( ) => {
32- this . redirectTo ( url . build ( 'customer/account/login/' ) ) ;
33- } , 2000 ) ;
31+ this . redirectTo ( url . build ( 'customer/account/login/' ) , 2000 ) ;
3432 } else {
3533 try {
3634 error = JSON . parse ( response . responseText ) ;
@@ -46,8 +44,10 @@ define([
4644 /**
4745 * Method to redirect by requested URL.
4846 */
49- redirectTo : function ( redirectUrl ) {
50- window . location . replace ( redirectUrl ) ;
47+ redirectTo : function ( redirectUrl , delay = 0 ) {
48+ setTimeout ( ( ) => {
49+ window . location . replace ( redirectUrl ) ;
50+ } , delay ) ;
5151 }
5252 } ;
5353} ) ;
You can’t perform that action at this time.
0 commit comments