mirror of
https://github.com/Spythere/station-manager-2.0.git
synced 2026-05-04 22:18:15 +00:00
fix: alert przy braku połączenia z serwerem
This commit is contained in:
@@ -73,6 +73,11 @@ export default defineComponent({
|
||||
this.loadData();
|
||||
this.$router.push('/');
|
||||
} catch (e: any) {
|
||||
if (!e.response || e.response.status === undefined) {
|
||||
this.store.alertMessage = 'Wystąpił błąd podczas łączenia z serwerem!';
|
||||
return;
|
||||
}
|
||||
|
||||
const response = e.response;
|
||||
const status: number = response.status;
|
||||
|
||||
@@ -82,7 +87,6 @@ export default defineComponent({
|
||||
}
|
||||
|
||||
this.store.alertMessage = 'Wystąpił błąd podczas łączenia z serwerem!';
|
||||
return;
|
||||
}
|
||||
},
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user