[O] Optimize error handling in login.ts

This commit is contained in:
Hykilpikonna
2019-08-22 16:24:32 +08:00
parent 91929df865
commit c19581e602
+7 -1
View File
@@ -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;
});
}
}