VRR: Fix issue with empty response

Signed-off-by: Benny Samir Hierl <bennysamir@posteo.de>
This commit is contained in:
Benny Samir Hierl 2020-11-05 07:45:02 +01:00
parent 4df23b2ab8
commit 5a202b67fa
No known key found for this signature in database
GPG key ID: 69DE3C3C097DB7F7

View file

@ -3,9 +3,11 @@
// icon-color: deep-green; icon-glyph: bus-alt;
/**************
Version 1.2.1
Version 1.2.2
Changelog:
v1.2.2:
- Fix issue with empty response
v1.2.1:
- Fix issue with small widget where time will be not correct displayed in case that a delay will be displayed
v1.2.0:
@ -15,7 +17,6 @@ Changelog:
- Setup Wizard enhanced
**************/
let transportTypes = [
{
name: 'ICE/IC/EC',
@ -93,7 +94,8 @@ async function fetchStationdata(Id, linesFilter, distance, transportCodes) {
try {
let res = await req.loadJSON()
return {departureData: res['departureData'], stationName: res['stationName']}
return {departureData: res['departureData'] || [], stationName: res['stationName']}
} catch (e) {
console.log(req.response)
console.log(e)