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