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([
28
28
message : $t ( 'You are not authorized to access this resource.' )
29
29
} ;
30
30
messageContainer . addErrorMessage ( error ) ;
31
- setTimeout ( ( ) => {
32
- this . redirectTo ( url . build ( 'customer/account/login/' ) ) ;
33
- } , 2000 ) ;
31
+ this . redirectTo ( url . build ( 'customer/account/login/' ) , 2000 ) ;
34
32
} else {
35
33
try {
36
34
error = JSON . parse ( response . responseText ) ;
@@ -46,8 +44,10 @@ define([
46
44
/**
47
45
* Method to redirect by requested URL.
48
46
*/
49
- redirectTo : function ( redirectUrl ) {
50
- window . location . replace ( redirectUrl ) ;
47
+ redirectTo : function ( redirectUrl , delay = 0 ) {
48
+ setTimeout ( ( ) => {
49
+ window . location . replace ( redirectUrl ) ;
50
+ } , delay ) ;
51
51
}
52
52
} ;
53
53
} ) ;
You can’t perform that action at this time.
0 commit comments