[O] Optimize error handling in login.ts
This commit is contained in:
@@ -32,6 +32,12 @@ export default class Login extends Vue
|
||||
this.$emit('login:courses', JSON.parse(text));
|
||||
})
|
||||
})
|
||||
.catch(alert);
|
||||
.catch(err =>
|
||||
{
|
||||
alert(err);
|
||||
|
||||
// Allow the user to retry
|
||||
this.loading = false;
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user