mirror of
https://github.com/placeAtlas/atlas.git
synced 2024-12-26 06:14:02 +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) {
|
||||
hideLoading()
|
||||
return
|
||||
return [configObject, newPeriod, newVariation]
|
||||
}
|
||||
const imageBlob = await fetchResult.blob()
|
||||
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))
|
||||
console.log(URL.createObjectURL(blob))
|
||||
image.src = URL.createObjectURL(blob)
|
||||
|
|
Loading…
Reference in a new issue