mirror of
https://github.com/placeAtlas/atlas.git
synced 2025-01-13 23:04:26 +01:00
Fix errors when nothing returned on updateCategory
This commit is contained in:
parent
2e728ef20f
commit
14151b639d
1 changed files with 2 additions and 2 deletions
|
@ -170,7 +170,7 @@ async function updateBackground(newPeriod = currentPeriod, newVariation = curren
|
||||||
});
|
});
|
||||||
if (currentUpdateIndex !== myUpdateIndex) {
|
if (currentUpdateIndex !== myUpdateIndex) {
|
||||||
hideLoading()
|
hideLoading()
|
||||||
return
|
return [configObject, newPeriod, newVariation]
|
||||||
}
|
}
|
||||||
const imageBlob = await fetchResult.blob()
|
const imageBlob = await fetchResult.blob()
|
||||||
imageCache[configObject.url] = URL.createObjectURL(imageBlob)
|
imageCache[configObject.url] = URL.createObjectURL(imageBlob)
|
||||||
|
@ -205,7 +205,7 @@ async function updateBackground(newPeriod = currentPeriod, newVariation = curren
|
||||||
})
|
})
|
||||||
|
|
||||||
}
|
}
|
||||||
if (currentUpdateIndex !== myUpdateIndex) return
|
if (currentUpdateIndex !== myUpdateIndex) return [configObject, newPeriod, newVariation]
|
||||||
const blob = await new Promise(resolve => canvas.toBlob(resolve))
|
const blob = await new Promise(resolve => canvas.toBlob(resolve))
|
||||||
console.log(URL.createObjectURL(blob))
|
console.log(URL.createObjectURL(blob))
|
||||||
image.src = URL.createObjectURL(blob)
|
image.src = URL.createObjectURL(blob)
|
||||||
|
|
Loading…
Reference in a new issue