File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed
Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -26,7 +26,6 @@ export default Vue.component('login-form', {
2626 // Handle a login request eminating from the form. If 2FA is required the
2727 // user will be presented with the 2FA modal window.
2828 submitForm : function ( ) {
29- const self = this ;
3029 this . $data . showSpinner = true ;
3130
3231 this . $flash . clear ( ) ;
@@ -47,13 +46,14 @@ export default Vue.component('login-form', {
4746 this . $store . commit ( 'auth/logout' ) ;
4847
4948 if ( ! err . response ) {
49+ this . $flash . error ( 'There was an error with the network request. Please try again.' ) ;
5050 return console . error ( err ) ;
5151 }
5252
5353 const response = err . response ;
5454 if ( response . data && isObject ( response . data . errors ) ) {
55- response . data . errors . forEach ( function ( error : any ) {
56- self . $flash . error ( error . detail ) ;
55+ response . data . errors . forEach ( ( error : any ) => {
56+ this . $flash . error ( error . detail ) ;
5757 } ) ;
5858 }
5959 } ) ;
Original file line number Diff line number Diff line change @@ -49,7 +49,7 @@ class Flash implements FlashInterface {
4949}
5050
5151export const FlashMixin : ComponentOptions < Vue > = {
52- methods : {
52+ computed : {
5353 '$flash' : function ( ) {
5454 return new Flash ( ) ;
5555 }
You can’t perform that action at this time.
0 commit comments