Replace throwing error with console.warn() when no train data in response

This commit is contained in:
2023-08-15 12:12:21 +01:00
parent 4a9089fbdc
commit 63d2508423
2 changed files with 3 additions and 3 deletions

View File

@ -189,7 +189,7 @@ export default {
const getTrainData = httpsCallable(functions, 'getLiveTrainData');
getTrainData().then((response) => {
try {
if (!response.data) throw new Error("Error fetching live train data from the database")
if (!response.data) console.warn("No train data in response!");
var unorderedTrains = [];
var insights = {
"totalNumTrains": 0,
@ -405,4 +405,4 @@ td.l, th.l{
content: "Destination";
}
}
</style>
</style>

View File

@ -415,7 +415,7 @@ export default {
const getTrainData = httpsCallable(functions, 'getLiveTrainData');
getTrainData().then((response) => {
try {
if (!response.data) throw new Error("Error fetching live train data from the database")
if (!response.data) console.warn("No train data in response!");
var unorderedTrains = [];
var currentMessages = [];
var insights = {