Fixing issue instance list not falling back (#2626)
- Expanded the fall-back to catch edge cases where the instance list returns a completely valid response of [] (an other- wise useless response which doesn't throw an error).
This commit is contained in:
parent
c3f8a3561b
commit
e2686dfe24
|
@ -39,6 +39,9 @@ const actions = {
|
||||||
})
|
})
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
console.error(err)
|
console.error(err)
|
||||||
|
}
|
||||||
|
// If the invidious instance fetch isn't returning anything interpretable
|
||||||
|
if (instances.length === 0) {
|
||||||
// Starts fallback strategy: read from static file
|
// Starts fallback strategy: read from static file
|
||||||
// And fallback to hardcoded entry(s) if static file absent
|
// And fallback to hardcoded entry(s) if static file absent
|
||||||
const fileName = 'invidious-instances.json'
|
const fileName = 'invidious-instances.json'
|
||||||
|
@ -58,7 +61,6 @@ const actions = {
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
commit('setInvidiousInstancesList', instances)
|
commit('setInvidiousInstancesList', instances)
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue