mirror of
https://github.com/streamwall/streamwall.git
synced 2026-01-29 08:22:49 -05:00
Fix crash when API returns error
This commit is contained in:
@@ -21,7 +21,7 @@ export async function* pollPublicData() {
|
|||||||
const publicDataURL = 'https://woke.net/api/streams.json'
|
const publicDataURL = 'https://woke.net/api/streams.json'
|
||||||
const refreshInterval = 5 * 1000
|
const refreshInterval = 5 * 1000
|
||||||
while (true) {
|
while (true) {
|
||||||
let data
|
let data = []
|
||||||
try {
|
try {
|
||||||
const resp = await fetch(publicDataURL)
|
const resp = await fetch(publicDataURL)
|
||||||
data = await resp.json()
|
data = await resp.json()
|
||||||
|
|||||||
Reference in New Issue
Block a user