Adjust if
This commit is contained in:
parent
108483597b
commit
440527480b
@ -16,7 +16,7 @@ async function init() {
|
|||||||
async function get(headcode) {
|
async function get(headcode) {
|
||||||
const apiPath = `train/headcode/today/${headcode}`
|
const apiPath = `train/headcode/today/${headcode}`
|
||||||
data = await getApi(apiPath, auth = true)
|
data = await getApi(apiPath, auth = true)
|
||||||
if (!data || typeof data !== 'number') {
|
if (typeof data == 'number' || !data) {
|
||||||
log('train-detail.get: Status: ' + data, 'ERR')
|
log('train-detail.get: Status: ' + data, 'ERR')
|
||||||
return []
|
return []
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user