mirror of
https://github.com/Spythere/station-manager-2.0.git
synced 2026-05-03 13:38:13 +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.loadData();
|
||||||
this.$router.push('/');
|
this.$router.push('/');
|
||||||
} catch (e: any) {
|
} 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 response = e.response;
|
||||||
const status: number = response.status;
|
const status: number = response.status;
|
||||||
|
|
||||||
@@ -82,7 +87,6 @@ export default defineComponent({
|
|||||||
}
|
}
|
||||||
|
|
||||||
this.store.alertMessage = 'Wystąpił błąd podczas łączenia z serwerem!';
|
this.store.alertMessage = 'Wystąpił błąd podczas łączenia z serwerem!';
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user