fix empty cache at first start

This commit is contained in:
Simon 2023-08-26 20:05:29 +07:00
parent ef89daf1a1
commit 87ef597116
No known key found for this signature in database
GPG Key ID: 2C15AA5E89985DD4

View File

@ -143,7 +143,8 @@ async function videoExists(id) {
async function getChannelCache() { async function getChannelCache() {
let cache = await browserType.storage.local.get('cache'); let cache = await browserType.storage.local.get('cache');
return cache || { cache: {} }; if (cache.cache) return cache;
return { cache: {} };
} }
async function setChannel(channelHandler, channelId) { async function setChannel(channelHandler, channelId) {